--
This commit is contained in:
parent
24f3d27984
commit
6b60015c02
9588 changed files with 1149251 additions and 49 deletions
13
node_modules/promise/domains/done.js
generated
vendored
Normal file
13
node_modules/promise/domains/done.js
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
var Promise = require('./core.js');
|
||||
|
||||
module.exports = Promise;
|
||||
Promise.prototype.done = function (onFulfilled, onRejected) {
|
||||
var self = arguments.length ? this.then.apply(this, arguments) : this;
|
||||
self.then(null, function (err) {
|
||||
setTimeout(function () {
|
||||
throw err;
|
||||
}, 0);
|
||||
});
|
||||
};
|
||||
Loading…
Reference in a new issue