Skip to content

Commit

Permalink
Fix Reflect.defineProperty on edge v0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 6, 2015
1 parent 84ef88c commit e8d7e65
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions es6-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -3184,9 +3184,11 @@
}
}
if (globals.Reflect.defineProperty) {
if (valueOrFalseIfThrows(function () {
globals.Reflect.defineProperty(1, 'test', { value: 1 });
return true;
if (!valueOrFalseIfThrows(function () {
var basic = !globals.Reflect.defineProperty(1, 'test', { value: 1 });
// "extensible" fails on Edge 0.12
var extensible = typeof Object.preventExtensions !== 'function' || !globals.Reflect.defineProperty(Object.preventExtensions({}), 'test', {});
return basic && extensible;
})) {
overrideNative(globals.Reflect, 'defineProperty', ReflectShims.defineProperty);
}
Expand Down

0 comments on commit e8d7e65

Please sign in to comment.