Skip to content

Commit 7dabc85

Browse files
committed
Fix syncing module state with incomplete live
1 parent fd0491d commit 7dabc85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

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

101101
// Module has not been saved, so is different
102102
const module = state.editor.currentSandbox.modules.find(
103103
m => m.shortid === moduleShortid
104104
);
105105

106106
if (module) {
107-
if (moduleInfo.code === null) {
107+
if (moduleInfo.code === null || !('code' in moduleInfo)) {
108108
return;
109109
}
110110

0 commit comments

Comments
 (0)