mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-10 21:01:41 +00:00
update
This commit is contained in:
12
node_modules/promise/polyfill-done.js
generated
vendored
Normal file
12
node_modules/promise/polyfill-done.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
// should work in any browser without browserify
|
||||
|
||||
if (typeof Promise.prototype.done !== 'function') {
|
||||
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)
|
||||
})
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user