GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — duplicate value in variable (#22390) · react/react@55d7500

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/shared
    • shallowEqual.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/shared/shallowEqual.js‎

Copy file name to clipboardExpand all lines: packages/shared/shallowEqual.js
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ function shallowEqual(objA: mixed, objB: mixed): boolean {
3838

3939
// Test for A's keys different from B.
4040
for (let i = 0; i < keysA.length; i++) {
41+
const currentKey = keysA[i];
4142
if (
42-
!hasOwnProperty.call(objB, keysA[i]) ||
43-
!is(objA[keysA[i]], objB[keysA[i]])
43+
!hasOwnProperty.call(objB, currentKey) ||
44+
!is(objA[currentKey], objB[currentKey])
4445
) {
4546
return false;
4647
}

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.