Add another check on faulty input
This commit is contained in:
parent
c49585a70a
commit
bf40ca9c4b
1 changed files with 4 additions and 0 deletions
|
@ -115,6 +115,10 @@ export default class TagRenderingConfig {
|
||||||
throw `${context}: Detected a freeform key without rendering... Key: ${this.freeform.key} in ${context}`
|
throw `${context}: Detected a freeform key without rendering... Key: ${this.freeform.key} in ${context}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.render && this.question && this.freeform === undefined){
|
||||||
|
throw `${context}: Detected a tagrendering which takes input without freeform key in ${context}`
|
||||||
|
}
|
||||||
|
|
||||||
if (this.question !== undefined && json.multiAnswer) {
|
if (this.question !== undefined && json.multiAnswer) {
|
||||||
if ((this.mappings?.length ?? 0) === 0) {
|
if ((this.mappings?.length ?? 0) === 0) {
|
||||||
throw `${context} MultiAnswer is set, but no mappings are defined`
|
throw `${context} MultiAnswer is set, but no mappings are defined`
|
||||||
|
|
Loading…
Reference in a new issue