diff options
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; |