Skip to content

Commit

Permalink
Instead of relying on "this", check an empty object.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jan 14, 2014
1 parent e944591 commit fbf110a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var has = Object.prototype.hasOwnProperty;

var getPrototypeOf = Object.getPrototypeOf;
if (!getPrototypeOf) {
if (typeof this.__proto__ === "object") {
if (typeof ({}).__proto__ === "object") {
getPrototypeOf = function (obj) {
return obj.__proto__;
};
Expand Down

0 comments on commit fbf110a

Please sign in to comment.