summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAleš Smodiš <aless@guru.si>2015-10-02 14:40:20 +0200
committerAleš Smodiš <aless@guru.si>2015-10-02 14:40:20 +0200
commitd79f2d14f365dc9395af2d159eebead6e57d98cb (patch)
treeda706e65314ce8c8d1b8680eb24e5db343700803 /js
parent75a8fc81c1b49a9b2ad610e801f56b3f05d13d00 (diff)
Bugfix: default hint translations weren't composed correctly.
Diffstat (limited to 'js')
-rw-r--r--js/codeq/problem.js4
1 files changed, 2 insertions, 2 deletions
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