Add more consistency checks, slight refactoring of theme conversions

This commit is contained in:
Pieter Vander Vennet 2022-02-04 00:44:09 +01:00
parent 5d884a97f9
commit 7001216ab7
8 changed files with 457 additions and 276 deletions

View file

@ -285,6 +285,10 @@ export class TagUtils {
throw `Error while parsing tag '${tag}' in ${context}: no key part and value part were found`
}
if(json.and !== undefined && json.or !== undefined){
throw `Error while parsing a TagConfig: got an object where both 'and' and 'or' are defined`}
if (json.and !== undefined) {
return new And(json.and.map(t => TagUtils.Tag(t, context)));
}