mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-22 23:23:54 +08:00
fix(snooze): Check if snooze category is defined when creating
This commit is contained in:
parent
a841417011
commit
bb52510c87
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ export function createSnoozeCategory(accountId, name = SNOOZE_CATEGORY_NAME) {
|
|||
return TaskQueueStatusStore.waitForPerformRemote(task).then(()=>{
|
||||
return DatabaseStore.findBy(Category, {clientId: category.clientId})
|
||||
.then((updatedCat)=> {
|
||||
if (updatedCat.isSavedRemotely()) {
|
||||
if (updatedCat && updatedCat.isSavedRemotely()) {
|
||||
return Promise.resolve(updatedCat)
|
||||
}
|
||||
return Promise.reject(new Error('Could not create Snooze category'))
|
||||
|
|
Loading…
Reference in a new issue