diff options
author | Aleš Smodiš <aless@guru.si> | 2015-10-02 14:41:39 +0200 |
---|---|---|
committer | Aleš Smodiš <aless@guru.si> | 2015-10-02 14:41:39 +0200 |
commit | 8f368bc83db0b6a938ea6f8650cb30b2c7bef060 (patch) | |
tree | 11a35267df50da42f547736c130d17b41e5b6252 /js/codeq | |
parent | d79f2d14f365dc9395af2d159eebead6e57d98cb (diff) |
Bugfix: consider common and problem-specific hint types independently from common and problem-specific hint content.
Diffstat (limited to 'js/codeq')
-rw-r--r-- | js/codeq/hint.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/js/codeq/hint.js b/js/codeq/hint.js index 643a3a4..d5e27b0 100644 --- a/js/codeq/hint.js +++ b/js/codeq/hint.js @@ -372,18 +372,12 @@ for (i = 0; i < n; i++) { serverHint = serverHints[i]; hintId = serverHint.id; - hintDef = hintProblemDefs[hintId]; - if (hintDef) { - hintContent = hintProblemTr[hintId]; - } - else { - hintDef = hintCommonDefs[hintId]; - hintContent = hintCommonTr[hintId]; - } + hintDef = hintProblemDefs[hintId] || hintCommonDefs[hintId]; if (!hintDef) { codeq.log.error('Undefined hint: ' + hintId); continue; } + hintContent = hintProblemTr[hintId] || hintCommonTr[hintId]; if (!hintContent) { codeq.log.error('Hint without content: ' + hintId); continue; |