Skip to content

Commit

Permalink
[Fix] es5-sham: getPrototypeOf: avoid infinite loop in pre-`__pro…
Browse files Browse the repository at this point in the history
…to__` browsers

Closes #458
  • Loading branch information
ljharb committed Nov 26, 2020
1 parent b501140 commit 64b444e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion es5-sham.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
Object.getPrototypeOf = function getPrototypeOf(object) {
// eslint-disable-next-line no-proto
var proto = object.__proto__;
if (proto || proto === null) {
if (proto || proto == null) { // `undefined` is for pre-proto browsers
return proto;
} else if (toStr(object.constructor) === '[object Function]') {
return object.constructor.prototype;
Expand Down

0 comments on commit 64b444e

Please sign in to comment.