Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 908bace

Browse files
authored
fix(server): TS2801 [ERROR]: This condition will always return true since this 'Promise<boolean>' is always defined (#394)
1 parent c2cd051 commit 908bace

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/aleph.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ export class Aleph implements IAleph {
938938
async importModule<T = any>(module: Module): Promise<T> {
939939
const path = join(this.#buildDir, module.jsFile)
940940
const hash = this.computeModuleHash(module)
941-
if (existsFile(path)) {
941+
if (await existsFile(path)) {
942942
return await import(`file://${path}#${(hash).slice(0, 6)}`)
943943
}
944944
throw new Error(`import ${module.specifier}: file not found: ${path}`)

0 commit comments

Comments
 (0)