Skip to content

Commit 57662ae

Browse files
Simplify isAsyncIterable (#2889)
1 parent f0502f9 commit 57662ae

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/jsutils/isAsyncIterable.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,5 @@ declare function isAsyncIterable(value: mixed): boolean %checks(value instanceof
99

1010
// eslint-disable-next-line no-redeclare
1111
export default function isAsyncIterable(maybeAsyncIterable) {
12-
if (maybeAsyncIterable == null || typeof maybeAsyncIterable !== 'object') {
13-
return false;
14-
}
15-
16-
return typeof maybeAsyncIterable[SYMBOL_ASYNC_ITERATOR] === 'function';
12+
return typeof maybeAsyncIterable?.[SYMBOL_ASYNC_ITERATOR] === 'function';
1713
}

0 commit comments

Comments
 (0)