From 348b79e0353b21cacc1d528d101fdc3e115ed14a Mon Sep 17 00:00:00 2001 From: Oliver Tacke Date: Thu, 17 Dec 2020 15:41:54 +0100 Subject: [PATCH] Fix enableSolutionsButton for question type contract --- src/scripts/h5p-dictation.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/scripts/h5p-dictation.js b/src/scripts/h5p-dictation.js index fc594c9..10e98af 100644 --- a/src/scripts/h5p-dictation.js +++ b/src/scripts/h5p-dictation.js @@ -79,8 +79,10 @@ class Dictation extends H5P.Question { this.languageTag = Util.formatLanguageCode(defaultLanguage); // TODO: When other functionality needs a minor version bump, rename semantics variable in upgrade script - this.params.behaviour.enableSolutionsButton = params.behaviour.enableSolution === undefined ? - true : params.behaviour.enableSolution; + if (typeof this.params.behaviour.enableSolutionsButton === 'undefined') { + this.params.behaviour.enableSolutionsButton = params.behaviour.enableSolution === undefined ? + true : params.behaviour.enableSolution; + } // Initialize if (!params) {