Skip to content

Commit 6dba6ce

Browse files
committed
ensure returns boolean value from isThenable
1 parent 1ee5907 commit 6dba6ce

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 Boolean(
794+
value && typeof value === 'object' && typeof value.then === 'function'
795+
);
794796
}
795797

796798
/**

0 commit comments

Comments
 (0)