You've already forked joplin
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:
@ -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];
|
||||
|
||||
|
Reference in New Issue
Block a user