Commit a76f2ce8 authored by Yehuda Katz's avatar Yehuda Katz

Slight cleanup

parent 2a43d27b
......@@ -2,7 +2,6 @@
var browserGlobal = (typeof window !== 'undefined') ? window : {};
// Extract this into its own library
var MutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
var async;
......@@ -137,9 +136,7 @@ var Promise = exports.Promise = function() {
}, this);
};
var throwException = function() {
//throw new Error("You cannot resolve this Promise because it has already been resolved.");
};
var noop = function() {};
var invokeCallback = function(type, promise, callback, event) {
var value, error;
......@@ -190,8 +187,8 @@ Promise.prototype = {
this.isResolved = value;
}, this);
this.resolve = throwException;
this.reject = throwException;
this.resolve = noop;
this.reject = noop;
},
reject: function(value) {
......@@ -200,8 +197,8 @@ Promise.prototype = {
this.isRejected = value;
}, this);
this.resolve = throwException;
this.reject = throwException;
this.resolve = noop;
this.reject = noop;
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment