From 9c7569fa7acd50e611f670d56cd89712d5d6da02 Mon Sep 17 00:00:00 2001 From: advplyr Date: Fri, 7 Jun 2024 16:43:12 -0500 Subject: [PATCH] Map localStorage ereaderSettings onto defaults --- client/components/readers/Reader.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/components/readers/Reader.vue b/client/components/readers/Reader.vue index 718ed542..919c2f3e 100644 --- a/client/components/readers/Reader.vue +++ b/client/components/readers/Reader.vue @@ -386,7 +386,12 @@ export default { try { const settings = localStorage.getItem('ereaderSettings') 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() } } catch (error) {