mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-20 22:23:53 +08:00
fix(mail-rules): Bail if a message is missing a thread
This commit is contained in:
parent
7973135dd3
commit
3c4d6b503b
1 changed files with 1 additions and 0 deletions
|
@ -100,6 +100,7 @@ class MailRulesProcessor
|
|||
# We always pull the thread from the database, even though it may be in
|
||||
# `incoming.thread`, because rules may be modifying it as they run!
|
||||
DatabaseStore.find(Thread, message.threadId).then (thread) =>
|
||||
return console.warn("Cannot find thread #{message.threadId} to process mail rules.") unless thread
|
||||
@_applyRuleToMessage(rule, message, thread)
|
||||
|
||||
_checkRuleForMessage: (rule, message) =>
|
||||
|
|
Loading…
Reference in a new issue