Skip to content

Commit

Permalink
Fix isObject to work with classes (#12)
Browse files Browse the repository at this point in the history
* fix isObject to work with classes
* improved isObject check
  • Loading branch information
kurtcorbett authored and mesaugat committed Mar 3, 2018
1 parent 4a19355 commit e49a916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/chai-exclude.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ module.exports = (chai, utils) => {
* @returns {Boolean}
*/
function isObject (arg) {
return arg instanceof Object && arg.constructor === Object
return arg === Object(arg) && Object.prototype.toString.call(arg) !== '[object Array]'
}

/**
Expand Down

0 comments on commit e49a916

Please sign in to comment.