More validation and fixes

This commit is contained in:
Pieter Vander Vennet 2021-04-10 03:50:44 +02:00
parent f10e7f008f
commit 4766f8bbde
13 changed files with 192 additions and 207 deletions

View file

@ -90,6 +90,9 @@ export default class TagRenderingConfig {
this.multiAnswer = json.multiAnswer ?? false
if (json.mappings) {
if(!Array.isArray(json.mappings)){
throw "Tagrendering has a 'mappings'-object, but expected a list ("+context+")"
}
this.mappings = json.mappings.map((mapping, i) => {