diff --git a/src/scan.ts b/src/scan.ts index e429be7..dee3cc4 100644 --- a/src/scan.ts +++ b/src/scan.ts @@ -39,7 +39,7 @@ export async function scanComponents (dirs: ScanDir[], srcDir: string): Promise< if (fileName.toLowerCase() === 'index') { fileName = pathPrefix === false ? basename(dirname(filePath)) : '' /* inherits from path */ } - const isAsync = (fileName.endsWith('.async') ? true : dirIsAsync) || null + const isAsync = (fileName.endsWith('.async') ? true : dirIsAsync) ?? true fileName = fileName.replace(/\.async$/, '') const fileNameParts = splitByCase(fileName)