diff --git a/index.js b/index.js index aacf6ef..542fb77 100644 --- a/index.js +++ b/index.js @@ -196,7 +196,7 @@ function objectToPromise(obj){ */ function isPromise(obj) { - return 'function' == typeof obj.then; + return !!obj && (typeof obj === 'object' && obj.__proto__ === Promise.prototype) } /**