We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
getProto
AsyncFunction
1 parent 981ab90 commit dc929a5Copy full SHA for dc929a5
index.js
@@ -43,5 +43,5 @@ module.exports = function isAsyncFunction(fn) {
43
// eslint-disable-next-line no-extra-parens
44
AsyncFunction = asyncFunc ? /** @type {import('.').AsyncFunction} */ (getProto(asyncFunc)) : false;
45
}
46
- return getProto(fn) === AsyncFunction;
+ return AsyncFunction && getProto(fn) === AsyncFunction;
47
};
0 commit comments