forked from MapComplete/MapComplete
Add some IDs and validation on IDS
This commit is contained in:
parent
4cb09ba8e7
commit
699e609fd7
6 changed files with 20 additions and 285 deletions
|
@ -275,7 +275,14 @@ export default class LayerConfig {
|
|||
}
|
||||
|
||||
this.tagRenderings = trs(json.tagRenderings, false);
|
||||
|
||||
const missingIds = json.tagRenderings.filter(tr => typeof tr !== "string" && tr["builtin"] === undefined && tr["id"] === undefined);
|
||||
|
||||
if(missingIds.length > 0){
|
||||
console.error("Some tagRenderings of", this.id, "are missing an id:", missingIds)
|
||||
throw "Missing ids in tagrenderings"
|
||||
}
|
||||
|
||||
this.filters = (json.filter ?? []).map((option, i) => {
|
||||
return new FilterConfig(option, `${context}.filter-[${i}]`)
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue