From 79aa98808c2969678657c0c9c5cb8bdb58d92c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 16 Oct 2024 17:38:44 +0200 Subject: [PATCH] fix: properly handle nullish arg in isAsyncFunction() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index 66b5102..c97da0d 100644 --- a/src/utils.js +++ b/src/utils.js @@ -5,7 +5,7 @@ export const isFunction = fn => { export const AsyncFunction = (async () => {}).constructor export const isAsyncFunction = fn => { - return AsyncFunction === fn.constructor + return AsyncFunction === fn?.constructor } export const isObject = value => {