aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-06-26 02:18:41 +1000
committerTerry Truong <terry06890@gmail.com>2022-06-26 02:18:41 +1000
commit09b6244d94b9a176172de448d3bb7fa386cb8995 (patch)
tree516a3bbc265ecfece2e2a405cef57512357c4e8a /src
parentdb92f2524fa5c6464b7d697e18ca4592d5d80156 (diff)
Fix redundant option-loading-on-resize bug
Diffstat (limited to 'src')
-rw-r--r--src/App.vue5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/App.vue b/src/App.vue
index 32ab3f8..7576278 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -748,8 +748,9 @@ export default defineComponent({
}
}
for (let prop of Object.getOwnPropertyNames(uiOpts) as (keyof UiOptions)[]){
- let item = localStorage.getItem(lytOptPrefix + prop);
- if (item == null && this.uiOpts[prop] != uiOpts[prop]){
+ let item = localStorage.getItem(uiOptPrefix + prop);
+ //Not: Using JSON.stringify here to roughly deep-compare values
+ if (item == null && JSON.stringify(this.uiOpts[prop]) != JSON.stringify(uiOpts[prop])){
this.uiOpts[prop] = uiOpts[prop];
if (prop == 'useReducedTree'){
changedTree = true;