From b699ea89d45c79c158c8f6c2d5ba5907672c4b8e Mon Sep 17 00:00:00 2001 From: Rakasch Date: Fri, 10 Nov 2023 14:06:47 +0100 Subject: [PATCH 1/2] Update Splitter.vue check for data integrity before saving --- components/lib/splitter/Splitter.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/lib/splitter/Splitter.vue b/components/lib/splitter/Splitter.vue index f88214796..87ce835c3 100644 --- a/components/lib/splitter/Splitter.vue +++ b/components/lib/splitter/Splitter.vue @@ -331,7 +331,9 @@ export default { } }, saveState() { - this.getStorage().setItem(this.stateKey, JSON.stringify(this.panelSizes)); + if(Array.isArray(this.panelSizes)) { + this.getStorage().setItem(this.stateKey, JSON.stringify(this.panelSizes)); + } }, restoreState() { const storage = this.getStorage(); From 2acb3a36ede92c20a220a6535c4e1b837e21dbb5 Mon Sep 17 00:00:00 2001 From: Rakasch Date: Sat, 11 Nov 2023 00:33:12 +0100 Subject: [PATCH 2/2] Update components/lib/splitter/Splitter.vue Co-authored-by: Melloware --- components/lib/splitter/Splitter.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/lib/splitter/Splitter.vue b/components/lib/splitter/Splitter.vue index 87ce835c3..1144adf54 100644 --- a/components/lib/splitter/Splitter.vue +++ b/components/lib/splitter/Splitter.vue @@ -331,7 +331,7 @@ export default { } }, saveState() { - if(Array.isArray(this.panelSizes)) { + if(ObjectUtils.isArray(this.panelSizes)) { this.getStorage().setItem(this.stateKey, JSON.stringify(this.panelSizes)); } },