mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-19 14:40:26 +08:00
Always specify draft=true when using headerMessageId so partial index is used
This commit is contained in:
parent
f5ad98a516
commit
0e214f0c3e
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ class DraftEditingSession
|
|||
@_draftPristineBody
|
||||
|
||||
prepare: ->
|
||||
@_draftPromise ?= DatabaseStore.findBy(Message, headerMessageId: @headerMessageId).include(Message.attributes.body).then (draft) =>
|
||||
@_draftPromise ?= DatabaseStore.findBy(Message, {headerMessageId: @headerMessageId, draft: true}).include(Message.attributes.body).then (draft) =>
|
||||
return Promise.reject(new Error("Draft has been destroyed.")) if @_destroyed
|
||||
return Promise.reject(new Error("Assertion Failure: Draft #{@headerMessageId} not found.")) if not draft
|
||||
return @_setDraft(draft)
|
||||
|
|
Loading…
Reference in a new issue