From 6c13b4627b0f99d4b834cb90fd2ceaa85d9ca205 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 16 Aug 2024 16:54:56 +0700 Subject: [PATCH] chore: ignore empty state of janDataFolder --- web/hooks/useLoadTheme.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/web/hooks/useLoadTheme.ts b/web/hooks/useLoadTheme.ts index 8afba27c4..314aaf8be 100644 --- a/web/hooks/useLoadTheme.ts +++ b/web/hooks/useLoadTheme.ts @@ -42,6 +42,7 @@ export const useLoadTheme = async () => { ) const getThemes = useCallback(async () => { + if (!janDataFolderPath.length) return const folderPath = await joinPath([janDataFolderPath, 'themes']) const installedThemes = await fs.readdirSync(folderPath)