Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Commit c034397

Browse files
committed
fix: guard against missing project
1 parent e7cf6ba commit c034397

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/renderer/create-change-notifiers.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,16 @@ export function createChangeNotifiers({ app, store }: NotifierContext): void {
101101
}, opts);
102102

103103
Mobx.autorun(() => {
104+
const project = store.getProject();
105+
106+
if (!project) {
107+
return;
108+
}
109+
104110
Sender.send({
105111
id: uuid.v4(),
106112
payload: {
107-
userStore: store
108-
.getProject()
109-
.getUserStore()
110-
.toJSON()
113+
userStore: project.getUserStore().toJSON()
111114
},
112115
type: Message.MessageType.ChangeUserStore
113116
});

0 commit comments

Comments
 (0)