diff options
author | Aleš Smodiš <aless@guru.si> | 2015-09-18 10:04:07 +0200 |
---|---|---|
committer | Aleš Smodiš <aless@guru.si> | 2015-09-18 10:04:07 +0200 |
commit | d53f6ca305da14cea431433601ba20835872c83d (patch) | |
tree | 73d2f12a6e4dcdfdc54da34e48a51733f8988999 /js/codeq | |
parent | a40a4145c724309ae58b2c7b7c3f4ab4f5d0c7df (diff) |
Bugfix: handle arrays as a static hint.
Diffstat (limited to 'js/codeq')
-rw-r--r-- | js/codeq/hint.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/codeq/hint.js b/js/codeq/hint.js index 6b8d12f..a94f571 100644 --- a/js/codeq/hint.js +++ b/js/codeq/hint.js @@ -153,14 +153,14 @@ } } t = typeof hintDef; - if (t === 'object') { - hintType = hintDef.type; - hintTemplate = hintDef.message; - } - else if (t === 'string') { + if ((t === 'string') || (hintDef instanceof Array)) { hintType = 'static'; hintTemplate = hintDef; } + else if (t === 'object') { + hintType = hintDef.type; + hintTemplate = hintDef.message; + } else { codeq.log.error('Unsupported hint definition: ' + t); continue; |