mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
duplicate value in variable (#22390)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user