Skip to content

Commit

Permalink
Clarify TypeError thrown by Map.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Nov 18, 2014
1 parent 5f5d280 commit e207f7e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions es6-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -1632,6 +1632,9 @@

function Map(iterable) {
var map = this;
if (!ES.TypeIsObject(map)) {
throw new TypeError('Map does not accept arguments when called as a function');
}
map = emulateES6construct(map);
if (!map._es6map) {
throw new TypeError('bad map');
Expand Down

0 comments on commit e207f7e

Please sign in to comment.