From 6f7c1b7fcc7e8cffaeaa9bd70c68dc0bdba3c1b4 Mon Sep 17 00:00:00 2001 From: Paal Joergensen Date: Tue, 21 Aug 2018 13:52:11 +0200 Subject: [PATCH] Clean up presave.js (Max score calculation) --- presave.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/presave.js b/presave.js index 4c629b5..97d2cac 100644 --- a/presave.js +++ b/presave.js @@ -11,7 +11,7 @@ H5PPresave['H5P.QuestionSet'] = function (content, finished) { var presave = H5PEditor.Presave; if (isContentInvalid()) { - throw new presave.exceptions.InvalidContentSemanticsException('Invalid Question Set Error') + throw new presave.exceptions.InvalidContentSemanticsException('Invalid Question Set Error'); } var score = content.questions @@ -30,9 +30,7 @@ H5PPresave['H5P.QuestionSet'] = function (content, finished) { presave.validateScore(score); - if (finished) { - finished({maxScore: score}); - } + finished({maxScore: score}); /** * Check if required parameters is present