-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I just noticed this line in the polyfill - https://github.com/WebAssembly/js-string-builtins/blob/main/test/js-api/js-string/polyfill.js#L150
if (startIndex > string.length,
endIndex > string.length,
endIndex < startIndex) {
return "";
Seems like this should probably be:
if (startIndex > string.length ||
endIndex > string.length ||
endIndex < startIndex) {
return "";
Since ,
expressions in JS only return their last value, making the first case only if (endIndex < startIndex) {
.
Metadata
Metadata
Assignees
Labels
No labels