Skip to content

Commit c59f559

Browse files
committed
Fix if module_state is not available
1 parent e1a4216 commit c59f559

File tree

1 file changed

+6
-4
lines changed
  • packages/app/src/app/overmind/effects/live

1 file changed

+6
-4
lines changed

packages/app/src/app/overmind/effects/live/index.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,12 @@ class Live {
154154
});
155155

156156
captureException(error);
157-
this.onOperationError({
158-
...error.module_state[moduleShortid],
159-
moduleShortid,
160-
});
157+
if (error.module_state) {
158+
this.onOperationError({
159+
...error.module_state[moduleShortid],
160+
moduleShortid,
161+
});
162+
}
161163
throw new Error(
162164
'The code was out of sync with the server, we had to reset the file'
163165
);

0 commit comments

Comments
 (0)