mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-11-08 07:21:18 +08:00
fix(sync-status): Fix bug caught by specs
This commit is contained in:
parent
4c250640fe
commit
752fade731
1 changed files with 2 additions and 2 deletions
|
|
@ -39,11 +39,11 @@ class NylasSyncStatusStore extends NylasStore
|
|||
|
||||
isSyncCompleteForAccount: (acctId, model) =>
|
||||
return false unless @_statesByAccount[acctId]
|
||||
return false if _.isEmpty(@_statesByAccount[acctId])
|
||||
if model
|
||||
return @_statesByAccount[acctId][model]?.complete ? false
|
||||
|
||||
for _model, modelState of @_statesByAccount
|
||||
return false if _.isEmpty(@_statesByAccount[acctId])
|
||||
for _model, modelState of @_statesByAccount[acctId]
|
||||
continue unless _model in ModelsForSync
|
||||
return false if not modelState.complete
|
||||
return true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue