Skip to content

Commit

Permalink
Update es6-shim.js
Browse files Browse the repository at this point in the history
* Reverted from paulmillr#466 - No need to check that this is 'undefined'.
* This pull request fix the following issue: paulmillr#470 paulmillr#467
  • Loading branch information
gnh1201 committed Jul 29, 2021
1 parent e08341b commit 2a03f3c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions es6-shim.js
Expand Up @@ -1264,10 +1264,7 @@
// 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) {
var ChromeArrayIterator = Object.getPrototypeOf([].values());
if (ChromeArrayIterator) { // in WSH, this is `undefined`
addIterator(ChromeArrayIterator);
}
addIterator(Object.getPrototypeOf([].values());
}

// note: this is positioned here because it relies on Array#entries
Expand Down Expand Up @@ -3585,7 +3582,7 @@
});
}

if (supportsDescriptors) {
if (!ReflectShims.defineProperty) { // possible alternative: if (supportsDescriptors)
var internalGet = function get(target, key, receiver) {
var desc = Object.getOwnPropertyDescriptor(target, key);

Expand Down

0 comments on commit 2a03f3c

Please sign in to comment.