Skip to content

Commit

Permalink
Update Promise.reject to match official ECMA-262 spec.
Browse files Browse the repository at this point in the history
There was a last-minute change to `Promise.reject` to make it better
match `Promise.resolve`.  See:
http://www.ecma-international.org/ecma-262/6.0/#sec-promise.reject
  • Loading branch information
cscott committed Jun 17, 2015
1 parent cf16ee3 commit e02e852
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion es6-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@
},

reject: function reject(reason) {
var C = getPromiseSpecies(this);
var C = this;
var capability = new PromiseCapability(C);
var rejectFunc = capability.reject;
rejectFunc(reason); // call with this===undefined
Expand Down

0 comments on commit e02e852

Please sign in to comment.