1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Mobile: Resolves #360: Don't crash if theme not set and improved logging.

This commit is contained in:
Laurent Cozic
2018-04-16 15:15:29 +02:00
parent be8bda8e73
commit 4d0af575e5
2 changed files with 14 additions and 2 deletions

View File

@ -100,7 +100,10 @@ function addExtraStyles(style) {
}
function themeStyle(theme) {
if (!theme) throw new Error('Theme not set');
if (!theme) {
console.warn('Theme not set!! Defaulting to Light theme');
theme = Setting.THEME_LIGHT;
}
if (themeCache_[theme]) return themeCache_[theme];