themes: ignore non theme files
This commit is contained in:
parent
e699ea63c7
commit
72ce7a5ad1
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue