Ensure important builder store variables do not get unassigned when setting the builder store state
This commit is contained in:
parent
c432c86419
commit
b2a58d1c35
|
@ -10,7 +10,6 @@ const dispatchEvent = (type, data = {}) => {
|
||||||
const createBuilderStore = () => {
|
const createBuilderStore = () => {
|
||||||
const initialState = {
|
const initialState = {
|
||||||
inBuilder: false,
|
inBuilder: false,
|
||||||
appId: null,
|
|
||||||
layout: null,
|
layout: null,
|
||||||
screen: null,
|
screen: null,
|
||||||
selectedComponentId: null,
|
selectedComponentId: null,
|
||||||
|
@ -94,6 +93,7 @@ const createBuilderStore = () => {
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
...writableStore,
|
...writableStore,
|
||||||
|
set: state => writableStore.set({ ...initialState, ...state }),
|
||||||
subscribe: derivedStore.subscribe,
|
subscribe: derivedStore.subscribe,
|
||||||
actions,
|
actions,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue