From 5ae1a4bc73f34d3a8f83607b79fe20d4594238e6 Mon Sep 17 00:00:00 2001 From: nanalelfe Date: Mon, 25 Jul 2016 01:40:57 -0400 Subject: Populated profile page with comments --- node_modules/promise/polyfill-done.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 node_modules/promise/polyfill-done.js (limited to 'node_modules/promise/polyfill-done.js') diff --git a/node_modules/promise/polyfill-done.js b/node_modules/promise/polyfill-done.js new file mode 100644 index 0000000..e50b4c0 --- /dev/null +++ b/node_modules/promise/polyfill-done.js @@ -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) + }) + } +} \ No newline at end of file -- cgit v1.2.3