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

padStart/padEnd in current safari is buggy and shouldnt be used #280

Closed
trashhalo opened this Issue Feb 8, 2017 · 3 comments

Comments

3 participants
@trashhalo

trashhalo commented Feb 8, 2017

The currently released version of safari has a bug in padStart padEnd that causes it to return null.

Fixed a bug where String.prototype.padStart() and padEnd() would insert null in rare cases

https://developer.apple.com/safari/technology-preview/release-notes/ fix in preview 15

While it says its rare we are hitting it about 40% of the time. As far as I can tell there isn't a externally facing way to force a polyfill to override native. Can you guys mark padStart/end as $export.F until this fix lands?

@benjie

This comment has been minimized.

benjie commented Apr 24, 2017

I was hitting this also on iOS (weirdly it doesn't happen so much when the Developer Tools are connected, but much more when they are not); lost over an hour to finding out what the issue in my code was (not least because I couldn't debug it with the devtools and it was Mobile Safari so I had to resort to alert() based debugging like some kind of Neanderthal).

A buggyfill for this would have saved me a lot of time.

@zloirock

This comment has been minimized.

Owner

zloirock commented Dec 11, 2017

Is forced replacement for /Version\/10\.\d+(\.\d+)? Safari\//.test(userAgent) enough, I hope?

@zloirock zloirock closed this in 2b314f8 Dec 11, 2017

@zloirock

This comment has been minimized.

Owner

zloirock commented Dec 11, 2017

Fixed in core-js@2.5.3.

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