From bf40ca9c4b8107883d7ced25be20bb7f86ca8c14 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 10 Mar 2021 12:55:39 +0100 Subject: [PATCH] Add another check on faulty input --- Customizations/JSON/TagRenderingConfig.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Customizations/JSON/TagRenderingConfig.ts b/Customizations/JSON/TagRenderingConfig.ts index e0093391c..a9462a330 100644 --- a/Customizations/JSON/TagRenderingConfig.ts +++ b/Customizations/JSON/TagRenderingConfig.ts @@ -114,6 +114,10 @@ export default class TagRenderingConfig { if (this.freeform && this.render === undefined) { 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.mappings?.length ?? 0) === 0) {