Skip to content

Commit

Permalink
Cache Object#hasOwnProperty in case clients break it as part of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jul 14, 2015
1 parent b235fce commit f9a8088
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/results.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var inherits = require('inherits');
var through = require('through');
var resumer = require('resumer');
var inspect = require('object-inspect');
var hasOwn = Object.prototype.hasOwnProperty;
var nextTick = typeof setImmediate !== 'undefined'
? setImmediate
: process.nextTick
Expand Down Expand Up @@ -185,5 +186,5 @@ function getNextTest (results) {
}

function has (obj, prop) {
return Object.prototype.hasOwnProperty.call(obj, prop);
return hasOwn.call(obj, prop);
}

0 comments on commit f9a8088

Please sign in to comment.