Skip to content

Commit

Permalink
duplicate value in variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Biki-das committed Sep 21, 2021
1 parent f35287d commit e518ff4
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 e518ff4

Please sign in to comment.