Skip to content

Commit a21909d

Browse files
committed
Only create client if there's unsynced code
1 parent 7dabc85 commit a21909d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/app/src/app/overmind/namespaces/live/internalActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ export const initializeModuleState: Action<any> = (
9696
) => {
9797
Object.keys(moduleState).forEach(moduleShortid => {
9898
const moduleInfo = moduleState[moduleShortid];
99-
effects.live.createClient(moduleShortid, moduleInfo.revision || 0);
10099

101100
// Module has not been saved, so is different
102101
const module = state.editor.currentSandbox.modules.find(
@@ -107,6 +106,7 @@ export const initializeModuleState: Action<any> = (
107106
if (moduleInfo.code === null || !('code' in moduleInfo)) {
108107
return;
109108
}
109+
effects.live.createClient(moduleShortid, moduleInfo.revision || 0);
110110

111111
const savedCodeChanged =
112112
getSavedCode(moduleInfo.code, moduleInfo.saved_code) !==

0 commit comments

Comments
 (0)