Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Commit 0204885

Browse files
committed
chore: try fix splitpanes error
1 parent 9f0d0a2 commit 0204885

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stores/ui.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const useUiState = defineStore('ui', () => {
88
panelDocs: 30,
99
panelEditor: 60,
1010
panelPreview: 40,
11-
panelFileTree: 20,
11+
panelFileTree: 0,
1212
showTerminal: false,
1313
}
1414
}
@@ -19,11 +19,11 @@ export const useUiState = defineStore('ui', () => {
1919

2020
const stateCookie = useCookie<Partial<typeof persistState>>(
2121
'nuxt-playground-ui-state',
22-
{ default: () => ({}), watch: true },
22+
{ default: () => (getLayoutDefaults()), watch: true },
2323
)
2424

2525
// update and sync cookie with the reactive state
26-
Object.assign(persistState, getLayoutDefaults(), stateCookie.value)
26+
Object.assign(persistState, getLayoutDefaults(), { ...stateCookie.value })
2727
watch(persistState, () => {
2828
stateCookie.value = { ...persistState }
2929
})

0 commit comments

Comments
 (0)