aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/ipcMain.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/ipcMain.ts b/src/main/ipcMain.ts
index 625f24f..c8e4567 100644
--- a/src/main/ipcMain.ts
+++ b/src/main/ipcMain.ts
@@ -53,10 +53,12 @@ async function listThemes(): Promise<UserThemeHeader[]> {
const themeInfo: UserThemeHeader[] = [];
for (const fileName of files) {
+ if (!fileName.endsWith(".css")) continue;
+
const data = await getThemeData(fileName).then(stripBOM).catch(() => null);
- if (!data) continue;
- const parsed = getThemeInfo(data, fileName);
- themeInfo.push(parsed);
+ if (data == null) continue;
+
+ themeInfo.push(getThemeInfo(data, fileName));
}
return themeInfo;