Skip to content

Commit

Permalink
fix: properly handle nullish arg in isAsyncFunction()
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <[email protected]>
  • Loading branch information
jerome-benoit committed Oct 16, 2024
1 parent e89c8dc commit 79aa988
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit 79aa988

Please sign in to comment.