We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0502f9 commit 57662aeCopy full SHA for 57662ae
src/jsutils/isAsyncIterable.js
@@ -9,9 +9,5 @@ declare function isAsyncIterable(value: mixed): boolean %checks(value instanceof
9
10
// eslint-disable-next-line no-redeclare
11
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';
+ return typeof maybeAsyncIterable?.[SYMBOL_ASYNC_ITERATOR] === 'function';
17
}
0 commit comments