Skip to content

Commit

Permalink
Merge pull request #137 from ioxua-os/master
Browse files Browse the repository at this point in the history
Adds support to diff objects with symbol keys

Another great contribution. Thanks! It is crazy how long it took me to notice this one... just shows how infrequently I get back to this library.
  • Loading branch information
Phillip Clark authored Jan 9, 2019
2 parents 9592407 + d5acfbb commit e2b5b86
Show file tree
Hide file tree
Showing 3 changed files with 547 additions and 505 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@
deepDiff(lhs[i], rhs[i], changes, prefilter, currentPath, i, stack, orderIndependent);
}
} else {
var akeys = Object.keys(lhs);
var pkeys = Object.keys(rhs);
var akeys = Object.keys(lhs).concat(Object.getOwnPropertySymbols(lhs));
var pkeys = Object.keys(rhs).concat(Object.getOwnPropertySymbols(rhs));
for (i = 0; i < akeys.length; ++i) {
k = akeys[i];
other = pkeys.indexOf(k);
Expand Down
Loading

0 comments on commit e2b5b86

Please sign in to comment.