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
Description
NodeList.forEachtreats both null and undefined as the omittedthisArgfast 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
thisArgshould 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