From f3f7fde29d7f9a3a629827f3ed28a426a536569a Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 1 Feb 2022 13:16:38 +0100 Subject: [PATCH] Fix build --- assets/layers/charging_station/csvToJson.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/layers/charging_station/csvToJson.ts b/assets/layers/charging_station/csvToJson.ts index 32e14924d..7d918eccb 100644 --- a/assets/layers/charging_station/csvToJson.ts +++ b/assets/layers/charging_station/csvToJson.ts @@ -3,6 +3,7 @@ import {Utils} from "../../../Utils"; import {TagRenderingConfigJson} from "../../../Models/ThemeConfig/Json/TagRenderingConfigJson"; import ScriptUtils from "../../../scripts/ScriptUtils"; import {LayerConfigJson} from "../../../Models/ThemeConfig/Json/LayerConfigJson"; +import FilterConfigJson from "../../../Models/ThemeConfig/Json/FilterConfigJson"; function colonSplit(value: string): string[] { @@ -265,6 +266,10 @@ function run(file, protojson) { protoString = protoString.replace(/{[ \t\n]*"id"[ \t\n]*:[ \t\n]*"\$\$\$"[ \t\n]*}/, stringified.join(",\n")) const proto = JSON.parse(protoString) + if(typeof proto.filter === "string"){ + throw "Filters of a the protojson should be a list of FilterConfigJsons" + } + proto.filter = proto.filter; proto.tagRenderings.forEach(tr => { if (typeof tr === "string") { return; @@ -275,7 +280,7 @@ function run(file, protojson) { } }) - proto["filter"].push({ + proto.filter.push({ id: "connection_type", options: filterOptions })