Ensure builder websocket is only instantiated once
This commit is contained in:
parent
fd8400bee5
commit
5d14bb70c6
|
@ -117,10 +117,13 @@ export const getFrontendStore = () => {
|
|||
reset: () => {
|
||||
store.set({ ...INITIAL_FRONTEND_STATE })
|
||||
websocket?.disconnect()
|
||||
websocket = null
|
||||
},
|
||||
initialise: async pkg => {
|
||||
const { layouts, screens, application, clientLibPath, hasLock } = pkg
|
||||
websocket = createBuilderWebsocket(application.appId)
|
||||
if (!websocket) {
|
||||
websocket = createBuilderWebsocket(application.appId)
|
||||
}
|
||||
await store.actions.components.refreshDefinitions(application.appId)
|
||||
|
||||
// Reset store state
|
||||
|
|
Loading…
Reference in New Issue