Skip to content

Commit

Permalink
Default predef values to false.
Browse files Browse the repository at this point in the history
  • Loading branch information
valueof authored and jugglinmike committed Oct 21, 2014
1 parent 8a6bcb3 commit e93e63c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/stable/jshint.js
Original file line number Diff line number Diff line change
Expand Up @@ -3226,19 +3226,20 @@ var JSHINT = (function () {

if (o) {
a = o.predef;

if (a) {
if (!Array.isArray(a) && typeof a === "object") {
a = Object.keys(a);
}

a.forEach(function (item) {
var slice;
var slice, prop;

if (item[0] === "-") {
slice = item.slice(1);
JSHINT.blacklist[slice] = slice;
} else {
predefined[item] = o.predef[item];
prop = Object.getOwnPropertyDescriptor(o.predef, item);
predefined[item] = prop ? prop.value : false;
}
});
}
Expand Down

0 comments on commit e93e63c

Please sign in to comment.