From d79f2d14f365dc9395af2d159eebead6e57d98cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Fri, 2 Oct 2015 14:40:20 +0200 Subject: Bugfix: default hint translations weren't composed correctly. --- js/codeq/problem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/codeq/problem.js b/js/codeq/problem.js index e430b21..4387344 100644 --- a/js/codeq/problem.js +++ b/js/codeq/problem.js @@ -40,7 +40,7 @@ hint = tr.hint; for (key in hint) { if (!hint.hasOwnProperty(key) || !hint[key]) continue; - if (!key in defaultHint) { + if (!(key in defaultHint)) { defaultHint[key] = hint[key]; allHintKeys.push(key); } @@ -283,7 +283,7 @@ chooseDefaultTranslation = function (rawTranslations, translationKey, condition) { var tr = rawTranslations.en, // try English as the default - lang, value; + lang; if (typeof condition !== 'function') condition = function (x) { return !!x; }; if (tr && condition(tr[translationKey])) return tr[translationKey]; for (lang in rawTranslations) { // find a translation with content -- cgit v1.2.1