Skip to content

Commit

Permalink
fixed lingering .toString issue, exposed in browser, not command line
Browse files Browse the repository at this point in the history
  • Loading branch information
Phillip Clark committed Apr 23, 2017
1 parent c62e8c0 commit 4fa76c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function deepDiff(lhs, rhs, changes, prefilter, path, key, stack) {
changes(new DiffDeleted(currentPath, lhs));
} else if (realTypeOf(lhs) !== realTypeOf(rhs)) {
changes(new DiffEdit(currentPath, lhs, rhs));
} else if (Object.prototype.toString.call(lhs) === '[object Date]' && Object.prototype.toString.call(rhs) === '[object Date]' && ((lhs - rhs) !== 0)) {
} else if (realTypeOf(lhs) === 'date' && (lhs - rhs) !== 0) {
changes(new DiffEdit(currentPath, lhs, rhs));
} else if (ltype === 'object' && lhs !== null && rhs !== null) {
stack = stack || [];
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function deepDiff(lhs, rhs, changes, prefilter, path, key, stack) {
changes(new DiffDeleted(currentPath, lhs));
} else if (realTypeOf(lhs) !== realTypeOf(rhs)) {
changes(new DiffEdit(currentPath, lhs, rhs));
} else if (Object.prototype.toString.call(lhs) === '[object Date]' && Object.prototype.toString.call(rhs) === '[object Date]' && ((lhs - rhs) !== 0)) {
} else if (realTypeOf(lhs) === 'date' && (lhs - rhs) !== 0) {
changes(new DiffEdit(currentPath, lhs, rhs));
} else if (ltype === 'object' && lhs !== null && rhs !== null) {
stack = stack || [];
Expand Down

0 comments on commit 4fa76c5

Please sign in to comment.