Map localStorage ereaderSettings onto defaults

This commit is contained in:
advplyr 2024-06-07 16:43:12 -05:00
parent ace490712e
commit 9c7569fa7a

View File

@ -386,7 +386,12 @@ export default {
try { try {
const settings = localStorage.getItem('ereaderSettings') const settings = localStorage.getItem('ereaderSettings')
if (settings) { if (settings) {
this.ereaderSettings = JSON.parse(settings) const _ereaderSettings = JSON.parse(settings)
for (const key in this.ereaderSettings) {
if (_ereaderSettings[key] !== undefined) {
this.ereaderSettings[key] = _ereaderSettings[key]
}
}
this.settingsUpdated() this.settingsUpdated()
} }
} catch (error) { } catch (error) {