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 — jsx: Remove unnecessary hasOwnProperty check (#28775) · react/react@0b3b8a6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/react/src/jsx
    • ReactJSXElement.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/react/src/jsx/ReactJSXElement.js‎

Copy file name to clipboardExpand all lines: packages/react/src/jsx/ReactJSXElement.js
+4-12Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -364,12 +364,8 @@ export function jsxProd(type, config, maybeKey) {
364364
// because in V8 it will deopt the object to dictionary mode.
365365
props = {};
366366
for (const propName in config) {
367-
if (
368-
hasOwnProperty.call(config, propName) &&
369-
// Skip over reserved prop names
370-
propName !== 'key' &&
371-
(enableRefAsProp || propName !== 'ref')
372-
) {
367+
// Skip over reserved prop names
368+
if (propName !== 'key' && (enableRefAsProp || propName !== 'ref')) {
373369
if (enableRefAsProp && !disableStringRefs && propName === 'ref') {
374370
props.ref = coerceStringRef(
375371
config[propName],
@@ -603,12 +599,8 @@ export function jsxDEV(type, config, maybeKey, isStaticChildren, source, self) {
603599
// because in V8 it will deopt the object to dictionary mode.
604600
props = {};
605601
for (const propName in config) {
606-
if (
607-
hasOwnProperty.call(config, propName) &&
608-
// Skip over reserved prop names
609-
propName !== 'key' &&
610-
(enableRefAsProp || propName !== 'ref')
611-
) {
602+
// Skip over reserved prop names
603+
if (propName !== 'key' && (enableRefAsProp || propName !== 'ref')) {
612604
if (enableRefAsProp && !disableStringRefs && propName === 'ref') {
613605
props.ref = coerceStringRef(
614606
config[propName],

0 commit comments

Comments
0 (0)
You are visitor 01402792 — 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.