diff --git a/scripts/generateLayerOverview.ts b/scripts/generateLayerOverview.ts index 55bd7f4d3..a87b3ade5 100644 --- a/scripts/generateLayerOverview.ts +++ b/scripts/generateLayerOverview.ts @@ -19,6 +19,7 @@ import {PrepareLayer} from "../Models/ThemeConfig/Conversion/PrepareLayer"; import {PrepareTheme} from "../Models/ThemeConfig/Conversion/PrepareTheme"; import {DesugaringContext} from "../Models/ThemeConfig/Conversion/Conversion"; import {Utils} from "../Utils"; +import {And} from "../Logic/Tags/And"; // This scripts scans 'assets/layers/*.json' for layer definition files and 'assets/themes/*.json' for theme definition files. // It spits out an overview of those to be used to load them @@ -204,6 +205,11 @@ class LayerOverviewUtils { for (const sharedLayerJson of layerFiles) { const context = "While building builtin layer " + sharedLayerJson.path const fixed = prepLayer.convertStrict(sharedLayerJson.parsed, context) + + if(fixed.source.osmTags["and"] === undefined){ + fixed.source.osmTags = {"and": [fixed.source.osmTags]} + } + const validator = new ValidateLayer(sharedLayerJson.path, true, knownImagePaths); validator.convertStrict(fixed, context)