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

Fix crash issue when using es5-sham 4.5.15 #466

Merged
merged 1 commit into from Apr 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion es6-shim.js
Expand Up @@ -1268,7 +1268,10 @@
// Chrome defines keys/values/entries on Array, but doesn't give us
// any way to identify its iterator. So add our own shimmed field.
if (Object.getPrototypeOf) {
addIterator(Object.getPrototypeOf([].values()));
var ChromeArrayIterator = Object.getPrototypeOf([].values());
if (ChromeArrayIterator) { // in WSH, this is `undefined`
addIterator(ChromeArrayIterator);
}
}

// note: this is positioned here because it relies on Array#entries
Expand Down