Skip to content

Commit

Permalink
fixes for holes
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Mar 5, 2014
1 parent 99cdfad commit ce25f73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = function inspect_ (obj, opts, depth, seen) {
else if (isArray(obj)) {
var xs = Array(obj.length);
for (var i = 0; i < obj.length; i++) {
xs[i] = inspect(obj[i], obj);
xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
}
return '[ ' + xs.join(', ') + ' ]';
}
Expand Down Expand Up @@ -80,7 +80,7 @@ function isRegExp (obj) {
}

function has (obj, key) {
if (!{}.hasOwnProperty) return true;
if (!{}.hasOwnProperty) return key in obj;
return {}.hasOwnProperty.call(obj, key);
}

Expand Down

0 comments on commit ce25f73

Please sign in to comment.