Skip to content

Commit

Permalink
Fix supportSubclassing check for Map in Firefox 32
Browse files Browse the repository at this point in the history
  • Loading branch information
amasad committed Oct 10, 2014
1 parent 93e4185 commit 9295a5e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion es6-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -1944,7 +1944,11 @@
isCallableWithoutNew(globals.Map) ||
isCallableWithoutNew(globals.Set) ||
!supportsSubclassing(globals.Map, function (M) {
return (new M([])) instanceof M;
var m = new M([]);
// Firefox 32 is ok with the instantiating the subclass but will
// throw when the map is used.
m.set(42, 42);
return m instanceof M;
})
) {
globals.Map = collectionShims.Map;
Expand Down

0 comments on commit 9295a5e

Please sign in to comment.