forked from MapComplete/MapComplete
Add sanity check
This commit is contained in:
parent
695800b245
commit
c291b16406
1 changed files with 4 additions and 0 deletions
|
@ -14,6 +14,10 @@ export class And extends TagsFilter {
|
||||||
constructor(and: TagsFilter[]) {
|
constructor(and: TagsFilter[]) {
|
||||||
super()
|
super()
|
||||||
this.and = and
|
this.and = and
|
||||||
|
if(and.some(p => typeof p === "string")){
|
||||||
|
console.error("Assertion failed: invalid subtags:", and)
|
||||||
|
throw "Assertion failed: invalid subtags found"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static construct(and: TagsFilter[]): TagsFilter
|
public static construct(and: TagsFilter[]): TagsFilter
|
||||||
|
|
Loading…
Add table
Reference in a new issue