Update Splitter.vue

check for data integrity before saving
pull/4800/head
Rakasch 2023-11-10 14:06:47 +01:00 committed by GitHub
parent 5e341367c2
commit b699ea89d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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();