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

Commit

Permalink
fix: guard against missing project
Browse files Browse the repository at this point in the history
  • Loading branch information
marionebl committed Sep 10, 2018
1 parent e7cf6ba commit c034397
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/renderer/create-change-notifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,16 @@ export function createChangeNotifiers({ app, store }: NotifierContext): void {
}, opts);

Mobx.autorun(() => {
const project = store.getProject();

if (!project) {
return;
}

Sender.send({
id: uuid.v4(),
payload: {
userStore: store
.getProject()
.getUserStore()
.toJSON()
userStore: project.getUserStore().toJSON()
},
type: Message.MessageType.ChangeUserStore
});
Expand Down

0 comments on commit c034397

Please sign in to comment.