diff --git a/src/utils/filesystem.ts b/src/utils/filesystem.ts index 6cb02eb..96ff535 100644 --- a/src/utils/filesystem.ts +++ b/src/utils/filesystem.ts @@ -18,8 +18,7 @@ export async function getNestedFilesDirs(dir: string): Promise { export async function getDirectories(dir: string): Promise { try { - - if(await isDirectory(dir)) { + if(dir && await isDirectory(dir)) { const searchResults = await Promise.all( (await readdir (dir))