Skip to content

Commit

Permalink
Making sure not to try to call getPrototypeOf unless it's available. …
Browse files Browse the repository at this point in the history
…Relates to #235.
  • Loading branch information
ljharb committed Mar 20, 2014
1 parent 863c30f commit 815a890
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion es6-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,9 @@
addIterator(Array.prototype, function() { return this.values(); });
// Chrome defines keys/values/entries on Array, but doesn't give us
// any way to identify its iterator. So add our own shimmed field.
addIterator(Object.getPrototypeOf([].values()));
if (Object.getPrototypeOf) {
addIterator(Object.getPrototypeOf([].values()));
}

var maxSafeInteger = Math.pow(2, 53) - 1;
defineProperties(Number, {
Expand Down

0 comments on commit 815a890

Please sign in to comment.