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