Skip to content

Commit

Permalink
Remove [object Object] checking.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jan 28, 2015
1 parent f00381b commit bc96071
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 @@ -53,7 +53,6 @@ var isString = function isString(value) {
}
};
var arrayType = '[object Array]';
var objType = '[object Object]';

var isFunction = function (value) {
try {
Expand Down Expand Up @@ -134,7 +133,8 @@ module.exports = function isEqual(value, other) {
return isEqual(valueStr, otherStr);;
}

if (type === objType) {
if (typeof value === 'object' || typeof other === 'object') {
if (typeof value !== typeof other) { return false; }
if (value.isPrototypeOf(other) || other.isPrototypeOf(value)) { return false; }
if (getPrototypeOf(value) !== getPrototypeOf(other)) { return false; }
var key;
Expand Down

0 comments on commit bc96071

Please sign in to comment.