fix(theme): update validation logic

This commit is contained in:
pylixonly 2024-12-26 12:59:55 +08:00
parent 26b7615f84
commit c3cbc78e13

View file

@ -63,7 +63,7 @@ function processData(data: VendettaThemeManifest) {
function validateTheme(themeJSON: any): boolean {
if (typeof themeJSON !== "object" || themeJSON === null) return false;
if (themeJSON.spec !== 2 && themeJSON.spec !== 3) return false;
if (!themeJSON.main) return false;
if (themeJSON.spec === 3 && !themeJSON.main) return false;
return true;
}