diff --git a/src/components/settings_modal/tabs/appearance_tab.js b/src/components/settings_modal/tabs/appearance_tab.js index 7ea4a09a..927b402d 100644 --- a/src/components/settings_modal/tabs/appearance_tab.js +++ b/src/components/settings_modal/tabs/appearance_tab.js @@ -119,7 +119,16 @@ const AppearanceTab = { updateIndex('theme').then(themes => { themes.forEach(([key, themePromise]) => themePromise.then(data => { - this.availableThemesV2.push({ key, data, name: data.name, version: 'v2' }) + console.log('DEBUG', data) + if (!data) { + console.warn(`Theme with key ${key} is empty or malformed`) + } else if (Array.isArray(data)) { + console.warn(`Theme with key ${key} is a v1 theme and should be moved to static/palettes/index.json`) + } else if (!data.source && !data.theme) { + console.warn(`Theme with key ${key} is malformed`) + } else { + this.availableThemesV2.push({ key, data, name: data.name, version: 'v2' }) + } })) }) diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.js b/src/components/settings_modal/tabs/theme_tab/theme_tab.js index e534a777..80768fe7 100644 --- a/src/components/settings_modal/tabs/theme_tab/theme_tab.js +++ b/src/components/settings_modal/tabs/theme_tab/theme_tab.js @@ -133,7 +133,7 @@ export default { Object .values(themesIndex) .forEach(themeFunc => { - themeFunc().then(themeData => this.availableStyles.push(themeData)) + themeFunc().then(themeData => themeData && this.availableStyles.push(themeData)) }) }) },