Index: src/promise.js |
diff --git a/src/promise.js b/src/promise.js |
index 27890a7626b37d12af837e73627617d6a94da4f2..d387f279810bf61d674a6b0aa28e771d27911ede 100644 |
--- a/src/promise.js |
+++ b/src/promise.js |
@@ -202,9 +202,9 @@ function PromiseHandle(value, handler, deferred) { |
function PromiseThen(onResolve, onReject) { |
onResolve = |
- IS_NULL_OR_UNDEFINED(onResolve) ? PromiseIdResolveHandler : onResolve; |
+ IS_SPEC_FUNCTION(onResolve) ? onResolve : PromiseIdResolveHandler; |
onReject = |
- IS_NULL_OR_UNDEFINED(onReject) ? PromiseIdRejectHandler : onReject; |
+ IS_SPEC_FUNCTION(onReject) ? onReject : PromiseIdRejectHandler; |
var that = this; |
var constructor = this.constructor; |
return %_CallFunction( |