Skip to content

Commit 2f58173

Browse files
committed
ensure returns boolean value from isThenable
1 parent 1ee5907 commit 2f58173

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/execution/execute.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,9 @@ function defaultResolveFn(source, args, { fieldName }) {
790790
* function.
791791
*/
792792
function isThenable(value: any): boolean {
793-
return value && typeof value === 'object' && typeof value.then === 'function';
793+
return value != null &&
794+
typeof value === 'object' &&
795+
typeof value.then === 'function';
794796
}
795797

796798
/**

0 commit comments

Comments
 (0)