summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAleš Smodiš <aless@guru.si>2015-09-18 10:04:07 +0200
committerAleš Smodiš <aless@guru.si>2015-09-18 10:04:07 +0200
commitd53f6ca305da14cea431433601ba20835872c83d (patch)
tree73d2f12a6e4dcdfdc54da34e48a51733f8988999 /js
parenta40a4145c724309ae58b2c7b7c3f4ab4f5d0c7df (diff)
Bugfix: handle arrays as a static hint.
Diffstat (limited to 'js')
-rw-r--r--js/codeq/hint.js10
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;