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

WSH + core-js@3.16.1 : String.prototype.split cannot expect accurate works. #971

Closed
gnh1201 opened this issue Aug 13, 2021 · 3 comments
Closed

Comments

@gnh1201
Copy link
Contributor

gnh1201 commented Aug 13, 2021

This happens sometimes. This occurs when split() has been run before (For example, in the loop).

var s = "monkey:red:apple:delicious:banana:long:train:fast:airplane:high:everest:sharp:seringue:painful";
s.split(':');
["red", "apple", "delicious", "banana", "long", "train", "fast", "airplane", "high", "everest", "sharp", "seringue", "painful"]
// Loss of the first element ​"monkey"
var s = "a=1=b=2=c=3";
s.split('=');
["a=1=b=2=c=3"]
// Array returned but not split.

WSH is based on JScript, so it may be related to the issue. #741 #751

Only core-js were used without any other polyfill libraries.

@zloirock
Copy link
Owner

Now I haven't a Windows machine to check it, feel free to propose a fix. #741 / #751 were fixed.

@zloirock
Copy link
Owner

zloirock commented Aug 13, 2021

Also, could you provide info about the version of Windows / WSH?

@gnh1201
Copy link
Contributor Author

gnh1201 commented Aug 20, 2021

Version: Windows 10, WSH 5.812

There is no problem at this time. If the same problem occurs again, I will reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants