diff options
Diffstat (limited to 'js')
-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; |