From 8f368bc83db0b6a938ea6f8650cb30b2c7bef060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Fri, 2 Oct 2015 14:41:39 +0200 Subject: Bugfix: consider common and problem-specific hint types independently from common and problem-specific hint content. --- js/codeq/hint.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'js/codeq') 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; -- cgit v1.2.1