From 91d30dfbd9803a117dc80ab111dabcfed4ceff50 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer <github@pcvolkmer.de> Date: Tue, 26 Dec 2017 15:44:00 +0100 Subject: [PATCH] Add keyword var for explicit variable declaration Cherry-picked from GH-52. --- src/main/resources/couchdb/lerning_progress.design.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/couchdb/lerning_progress.design.js b/src/main/resources/couchdb/lerning_progress.design.js index 45c27e113..5ae5ba844 100644 --- a/src/main/resources/couchdb/lerning_progress.design.js +++ b/src/main/resources/couchdb/lerning_progress.design.js @@ -9,7 +9,7 @@ var designDoc = { /* The 'questionValue' contains the points scored with this answer, * and this could be negative if a wrong answer was given. * However, we do not want negative values, so we set the lower bound to 0.*/ - score = Math.max(doc.questionValue || 0, 0); + var score = Math.max(doc.questionValue || 0, 0); emit([doc.sessionId, doc.user], { questionId: doc.questionId, score: score, piRound: doc.piRound -- GitLab