-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(browser support): make IE lte 10 work by fixing Object.getPrototy…
…peOf broken since babel6, see https://phabricator.babeljs.io/T3041
- Loading branch information
vvo
committed
Mar 2, 2016
1 parent
8025a5c
commit bbb264b
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* eslint-disable */ | ||
|
||
// FIX IE <= 10 babel6: | ||
// - https://phabricator.babeljs.io/T3041 | ||
// - https://phabricator.babeljs.io/T3041#70671 | ||
var testObject = {}; | ||
|
||
if (!(Object.setPrototypeOf || testObject.__proto__)) { | ||
var nativeGetPrototypeOf = Object.getPrototypeOf; | ||
|
||
Object.getPrototypeOf = function(object) { | ||
if (object.__proto__) { | ||
return object.__proto__; | ||
} else { | ||
return nativeGetPrototypeOf.call(Object, object); | ||
} | ||
} | ||
} |