Ensure important builder store variables do not get unassigned when setting the builder store state

This commit is contained in:
Andrew Kingston 2021-11-18 20:31:25 +00:00
parent b7b424b7f8
commit 327ee5726d
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,6 @@ const dispatchEvent = (type, data = {}) => {
const createBuilderStore = () => {
const initialState = {
inBuilder: false,
appId: null,
layout: null,
screen: null,
selectedComponentId: null,
@ -94,6 +93,7 @@ const createBuilderStore = () => {
}
return {
...writableStore,
set: state => writableStore.set({ ...initialState, ...state }),
subscribe: derivedStore.subscribe,
actions,
}