You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation of method Array.prototype.join() diverts from the official ECMAScript (ES) version 6.0 documentation. ECMAScript treats undefined and null elements as empty strings, while this custom proprietary runtime first converts them to null, then converts null to string and only then treats these double converted strings as elements:
patrik-simunic-cz
changed the title
Behaviour of Array.prototype.join() incompatible with ECMAScript v6.0
[JS] Behaviour of Array.prototype.join() incompatible with ECMAScript v6.0
Jan 21, 2024
Issue description
The implementation of method
Array.prototype.join()
diverts from the official ECMAScript (ES) version 6.0 documentation. ECMAScript treatsundefined
andnull
elements as empty strings, while this custom proprietary runtime first converts them tonull
, then convertsnull
to string and only then treats these double converted strings as elements:Read the relevant section here - https://262.ecma-international.org/6.0/#sec-array.prototype.join
- under the procedure step
13.c
you'll find stated:Bug reproduction
See the reproducible bug demo here: https://github.com/testuj-to/appsync-esv6-incompatible-join
In the demo, 2 strings are expected to be returned (
"foo/"
and"foo/"
), instead this is the output:The text was updated successfully, but these errors were encountered: