Skip to content

Commit 6ef70b8

Browse files
authored
fix: don't rely on global toString() for checking if object
Re: jsdom/jsdom#1752, Automattic/mongoose#5033
1 parent 791728e commit 6ef70b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ var parseIndexOptions = function(fieldOrSpec) {
230230
}
231231

232232
var isObject = exports.isObject = function (arg) {
233-
return '[object Object]' == toString.call(arg)
233+
return '[object Object]' == Object.prototype.toString.call(arg)
234234
}
235235

236236
var debugOptions = function(debugFields, options) {

0 commit comments

Comments
 (0)