Map locally stored ebook settings onto defaults

This commit is contained in:
advplyr 2024-06-10 16:38:29 -05:00
parent 81130e04e5
commit eb2aa6f773

View file

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