themes: ignore non theme files
This commit is contained in:
parent
e699ea63c7
commit
72ce7a5ad1
@ -53,10 +53,12 @@ async function listThemes(): Promise<UserThemeHeader[]> {
|
|||||||
const themeInfo: UserThemeHeader[] = [];
|
const themeInfo: UserThemeHeader[] = [];
|
||||||
|
|
||||||
for (const fileName of files) {
|
for (const fileName of files) {
|
||||||
|
if (!fileName.endsWith(".css")) continue;
|
||||||
|
|
||||||
const data = await getThemeData(fileName).then(stripBOM).catch(() => null);
|
const data = await getThemeData(fileName).then(stripBOM).catch(() => null);
|
||||||
if (!data) continue;
|
if (data == null) continue;
|
||||||
const parsed = getThemeInfo(data, fileName);
|
|
||||||
themeInfo.push(parsed);
|
themeInfo.push(getThemeInfo(data, fileName));
|
||||||
}
|
}
|
||||||
|
|
||||||
return themeInfo;
|
return themeInfo;
|
||||||
|
Loading…
Reference in New Issue
Block a user