Add sanity check

This commit is contained in:
Pieter Vander Vennet 2024-08-23 11:39:57 +02:00
parent 695800b245
commit c291b16406

View file

@ -14,6 +14,10 @@ export class And extends TagsFilter {
constructor(and: TagsFilter[]) {
super()
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