fix: copy preloadedstate object for pinia to avoid using an existing state when re-creating store
This commit is contained in:
@@ -18,7 +18,9 @@ export default function configureStore(
|
|||||||
|
|
||||||
return defineStore({
|
return defineStore({
|
||||||
id: 'revue-flow-' + Math.random(),
|
id: 'revue-flow-' + Math.random(),
|
||||||
state: () => preloadedState,
|
state: () => ({
|
||||||
|
...preloadedState
|
||||||
|
}),
|
||||||
getters: {},
|
getters: {},
|
||||||
actions: {
|
actions: {
|
||||||
setElements(elements) {
|
setElements(elements) {
|
||||||
|
|||||||
Reference in New Issue
Block a user