Skip to content

Instantly share code, notes, and snippets.

@eisisig
Forked from darobin/usable-promises.js
Last active February 12, 2016 17:22
Show Gist options
  • Save eisisig/2a8c45e2e027bd2951e8 to your computer and use it in GitHub Desktop.
Save eisisig/2a8c45e2e027bd2951e8 to your computer and use it in GitHub Desktop.
// from the brilliant mind of sb
var _catch = Promise.prototype.catch;
Promise.prototype.catch = function () {
return _catch.call(this, function (err) { setTimeout(function () { throw(err); }, 0); });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment