Fix build
This commit is contained in:
parent
8915345550
commit
d9ab9f1c8f
3 changed files with 15 additions and 14 deletions
|
@ -257,7 +257,6 @@
|
|||
{
|
||||
"builtin": "id_presets.shop_types",
|
||||
"override": {
|
||||
"id": "shop_types",
|
||||
"labels": [
|
||||
"description"
|
||||
],
|
||||
|
@ -308,7 +307,8 @@
|
|||
}
|
||||
],
|
||||
"condition": "craft=",
|
||||
"invalidValues": "shop=yes"
|
||||
"invalidValues": "shop=yes",
|
||||
"filter": true
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1175,7 +1175,6 @@
|
|||
],
|
||||
"filter": [
|
||||
"open_now",
|
||||
"shop_types",
|
||||
{
|
||||
"id": "second_hand",
|
||||
"options": [
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
# Creates various empty (stub) version of files
|
||||
|
||||
mkdir -p ./src/assets/generated/layers; echo {\\\"themes\\\":[]} > ./src/assets/generated/known_themes.json
|
||||
echo {\\\"layers\\\": []} > ./src/assets/generated/known_layers.json
|
||||
mkdir -p ./src/assets/generated/layers;
|
||||
echo '{"themes":[]}' > ./src/assets/generated/known_themes.json
|
||||
echo '{"layers": []}' > ./src/assets/generated/known_layers.json
|
||||
rm -f ./src/assets/generated/layers/*.json
|
||||
rm -f ./src/assets/generated/themes/*.json
|
||||
cp ./assets/layers/usersettings/usersettings.json ./src/assets/generated/layers/usersettings.json
|
||||
|
@ -11,4 +12,4 @@ mkdir -p ./src/assets/generated/layers; echo {\\\"themes\\\":[]} > ./src/assets/
|
|||
echo '{}' > ./src/assets/generated/layers/summary.json
|
||||
echo '{}' > ./src/assets/generated/layers/last_click.json
|
||||
echo '{}' > ./src/assets/generated/layers/search.json
|
||||
echo '[]' > ./src/assets/generated/theme_overview.json /theme_overview.json
|
||||
echo '[]' > ./src/assets/generated/theme_overview.json
|
||||
|
|
|
@ -62,9 +62,9 @@ class ExpandFilter extends DesugaringStep<LayerConfigJson> {
|
|||
)
|
||||
}
|
||||
const options = (<QuestionableTagRenderingConfigJson>tr).mappings.map((mapping) => {
|
||||
let icon : string= mapping.icon?.["path"] ?? mapping.icon
|
||||
let icon: string = mapping.icon?.["path"] ?? mapping.icon
|
||||
let emoji: string = undefined
|
||||
if(Utils.isEmoji(icon)){
|
||||
if (Utils.isEmoji(icon)) {
|
||||
emoji = icon
|
||||
icon = undefined
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ class ExpandFilter extends DesugaringStep<LayerConfigJson> {
|
|||
question: mapping.then,
|
||||
osmTags: mapping.if,
|
||||
searchTerms: mapping.searchTerms,
|
||||
icon, emoji
|
||||
icon, emoji,
|
||||
})
|
||||
})
|
||||
// Add default option
|
||||
|
@ -99,7 +99,7 @@ class ExpandFilter extends DesugaringStep<LayerConfigJson> {
|
|||
const newFilters: FilterConfigJson[] = []
|
||||
const filters = <(FilterConfigJson | string)[]>json.filter
|
||||
|
||||
function filterExists(filterName: string): boolean{
|
||||
function filterExists(filterName: string): boolean {
|
||||
return filters.some((existing) => {
|
||||
const id: string = existing["id"] ?? existing
|
||||
return (
|
||||
|
@ -118,7 +118,7 @@ class ExpandFilter extends DesugaringStep<LayerConfigJson> {
|
|||
continue
|
||||
}
|
||||
if (tagRendering.filter === true) {
|
||||
if(filterExists(tagRendering["id"])){
|
||||
if (filterExists(tagRendering["id"])) {
|
||||
continue
|
||||
}
|
||||
filters.push(ExpandFilter.buildFilterFromTagRendering(tagRendering, context.enters("tagRenderings", i, "filter")))
|
||||
|
@ -129,6 +129,7 @@ class ExpandFilter extends DesugaringStep<LayerConfigJson> {
|
|||
context.enters("tagRenderings", i, "filter").err("Not a string: " + filterName)
|
||||
}
|
||||
if (filterExists(filterName)) {
|
||||
// This filter has already been added
|
||||
continue
|
||||
}
|
||||
if (!filterName) {
|
||||
|
|
Loading…
Reference in a new issue