mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-09 01:35:52 +08:00
Fix calls to new DestroyDraftTask
This commit is contained in:
parent
94ef9813b6
commit
432baa6a3a
1 changed files with 5 additions and 2 deletions
|
@ -126,7 +126,10 @@ class DraftStore extends NylasStore {
|
|||
_.each(this._draftSessions, (session) => {
|
||||
const draft = session.draft()
|
||||
if (draft && draft.pristine) {
|
||||
Actions.queueTask(new DestroyDraftTask(draft.accountId, draft.headerMessageId));
|
||||
Actions.queueTask(new DestroyDraftTask({
|
||||
accountId: draft.accountId,
|
||||
headerMessageId: draft.headerMessageId,
|
||||
}));
|
||||
} else {
|
||||
promises.push(session.changes.commit());
|
||||
}
|
||||
|
@ -353,7 +356,7 @@ class DraftStore extends NylasStore {
|
|||
})
|
||||
|
||||
// Queue the task to destroy the draft
|
||||
Actions.queueTask(new DestroyDraftTask(accountId, headerMessageId));
|
||||
Actions.queueTask(new DestroyDraftTask({accountId, headerMessageId}));
|
||||
|
||||
if (NylasEnv.isComposerWindow()) {
|
||||
NylasEnv.close();
|
||||
|
|
Loading…
Reference in a new issue