Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsx: Remove unnecessary hasOwnProperty check #28775

Merged
merged 1 commit into from
Apr 8, 2024

Commits on Apr 6, 2024

  1. jsx: Remove unnecessary hasOwnProperty check

    Follow up to facebook#28768.
    
    The modern JSX runtime (`jsx`) does not need to check if each prop is
    a direct property with `hasOwnProperty` because the compiler always
    passes a plain object.
    
    I'll leave the check in the old JSX runtime (`createElement`) since that
    one can be called manually with any kind of object, and if there were
    old user code that relied on this for some reason, it would be using
    that runtime.
    acdlite committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    9a2f7f4 View commit details
    Browse the repository at this point in the history