Skip to content

Commit

Permalink
Tie React-specific checks together
Browse files Browse the repository at this point in the history
  • Loading branch information
kale-stew committed May 8, 2020
1 parent 644ec6d commit 1c474a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function equal(a, b) {

// custom handling for React/Preact
for (i = length; i-- !== 0;) {
if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {
if ((keys[i] === '_owner' && a.$$typeof) || keys[i] === '__v' || keys[i] === '__o') {
// React-specific: avoid traversing React elements' _owner
// Preact-specific: avoid traversing Preact elements' __v and __o
// __v = $_original / $_vnode
Expand Down

0 comments on commit 1c474a1

Please sign in to comment.