Skip to content

NodeList.forEach drops an explicit null callback context #58242

Description

@OskarEichler

Description

NodeList.forEach treats both null and undefined as the omitted thisArg fast path. An explicitly supplied null is therefore discarded, and a strict callback receives undefined instead of null, unlike standard Array and NodeList behavior.

Expected behavior

Only an omitted/undefined thisArg should use the unbound callback path. Explicit null should be forwarded as the callback receiver.

React Native Version

0.87.1 and current main

Affected Platforms

JavaScript runtime - All

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions