From 327ee5726d795993f18167641a7dfff10a26f8e0 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 18 Nov 2021 20:31:25 +0000 Subject: [PATCH] Ensure important builder store variables do not get unassigned when setting the builder store state --- packages/client/src/stores/builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/stores/builder.js b/packages/client/src/stores/builder.js index 08ac6ba906..35fb3edae2 100644 --- a/packages/client/src/stores/builder.js +++ b/packages/client/src/stores/builder.js @@ -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, }