diff --git a/apps/generator/lib/utils.js b/apps/generator/lib/utils.js index 6403eb2fd..e43d09363 100644 --- a/apps/generator/lib/utils.js +++ b/apps/generator/lib/utils.js @@ -131,7 +131,7 @@ utils.getGeneratorVersion = () => { * @returns {Boolean} is function asynchronous */ utils.isAsyncFunction = (fn) => { - return fn && fn.constructor && fn.constructor.name === 'AsyncFunction'; + return fn?.constructor?.name === 'AsyncFunction'; }; /**