Fix build
This commit is contained in:
parent
c15f3d2036
commit
f3f7fde29d
1 changed files with 6 additions and 1 deletions
|
@ -3,6 +3,7 @@ import {Utils} from "../../../Utils";
|
||||||
import {TagRenderingConfigJson} from "../../../Models/ThemeConfig/Json/TagRenderingConfigJson";
|
import {TagRenderingConfigJson} from "../../../Models/ThemeConfig/Json/TagRenderingConfigJson";
|
||||||
import ScriptUtils from "../../../scripts/ScriptUtils";
|
import ScriptUtils from "../../../scripts/ScriptUtils";
|
||||||
import {LayerConfigJson} from "../../../Models/ThemeConfig/Json/LayerConfigJson";
|
import {LayerConfigJson} from "../../../Models/ThemeConfig/Json/LayerConfigJson";
|
||||||
|
import FilterConfigJson from "../../../Models/ThemeConfig/Json/FilterConfigJson";
|
||||||
|
|
||||||
|
|
||||||
function colonSplit(value: string): string[] {
|
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"))
|
protoString = protoString.replace(/{[ \t\n]*"id"[ \t\n]*:[ \t\n]*"\$\$\$"[ \t\n]*}/, stringified.join(",\n"))
|
||||||
const proto = <LayerConfigJson>JSON.parse(protoString)
|
const proto = <LayerConfigJson>JSON.parse(protoString)
|
||||||
|
if(typeof proto.filter === "string"){
|
||||||
|
throw "Filters of a the protojson should be a list of FilterConfigJsons"
|
||||||
|
}
|
||||||
|
proto.filter = <FilterConfigJson[]> proto.filter;
|
||||||
proto.tagRenderings.forEach(tr => {
|
proto.tagRenderings.forEach(tr => {
|
||||||
if (typeof tr === "string") {
|
if (typeof tr === "string") {
|
||||||
return;
|
return;
|
||||||
|
@ -275,7 +280,7 @@ function run(file, protojson) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
proto["filter"].push({
|
proto.filter.push({
|
||||||
id: "connection_type",
|
id: "connection_type",
|
||||||
options: filterOptions
|
options: filterOptions
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue