From b818c258629135179731fbc851e38f07d2c1a4bb Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Tue, 23 Feb 2016 13:57:15 +0100 Subject: Remove redundant parameter from static hint handler --- js/codeq/hint.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/codeq/hint.js b/js/codeq/hint.js index 1d0ff09..b26f522 100644 --- a/js/codeq/hint.js +++ b/js/codeq/hint.js @@ -180,8 +180,8 @@ along with this program. If not, see . */ }, typeHandlers = { - 'static': function (template, serverHint, hintId) { - var content = prepareStaticHintContent(template, serverHint.indices, hintId), + 'static': function (template, serverHint) { + var content = prepareStaticHintContent(template, serverHint.indices, serverHint.id), args = serverHint ? serverHint.args : null, hintIndex = 0, trButton = {}, @@ -204,7 +204,7 @@ along with this program. If not, see . */ } } catch (e) { - msg = 'Error processing hint ' + hintId + ' at index ' + hintIndex + ' for language ' + lang + ': ' + e; + msg = 'Error processing hint ' + serverHint.id + ' at index ' + hintIndex + ' for language ' + lang + ': ' + e; codeq.log.error(msg, e); trContent[lang] = msg; } @@ -349,7 +349,7 @@ along with this program. If not, see . */ */ 'planNext': function () { if (planIdx < planDef.length) { - typeHandlers['static'](planDef[planIdx], {}, 'plan'); + typeHandlers['static'](planDef[planIdx], {'id': 'plan'}); planIdx++; } return planIdx < planDef.length; @@ -397,7 +397,7 @@ along with this program. If not, see . */ fn = typeHandlers[hintType]; if (!fn) codeq.log.error('Unsupported hint type: ' + hintType); else { - ret = fn(hintContent, serverHint, hintId); + ret = fn(hintContent, serverHint); if (typeof ret === 'function') finalizers.push(ret); } } -- cgit v1.2.1