Skip to content

Commit

Permalink
duplicate value in variable (#22390)
Browse files Browse the repository at this point in the history
  • Loading branch information
Biki-das authored Oct 11, 2021
1 parent afcb9cd commit 55d7500
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/shared/shallowEqual.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ function shallowEqual(objA: mixed, objB: mixed): boolean {

// Test for A's keys different from B.
for (let i = 0; i < keysA.length; i++) {
const currentKey = keysA[i];
if (
!hasOwnProperty.call(objB, keysA[i]) ||
!is(objA[keysA[i]], objB[keysA[i]])
!hasOwnProperty.call(objB, currentKey) ||
!is(objA[currentKey], objB[currentKey])
) {
return false;
}
Expand Down

0 comments on commit 55d7500

Please sign in to comment.