Skip to content

Commit

Permalink
__proto__ may be a reserved word in ES3
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Mar 23, 2014
1 parent 34f6860 commit ebe9113
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ var has = ObjectPrototype.hasOwnProperty;

var getPrototypeOf = Object.getPrototypeOf;
if (!getPrototypeOf) {
if (typeof ({}).__proto__ === "object") {
if (typeof 'test'['__proto__'] === "object") {
getPrototypeOf = function (obj) {
return obj.__proto__;
return obj['__proto__'];
};
} else {
getPrototypeOf = function (obj) {
Expand Down

0 comments on commit ebe9113

Please sign in to comment.