mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-11-12 17:31:05 +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) =>
|
isSyncCompleteForAccount: (acctId, model) =>
|
||||||
return false unless @_statesByAccount[acctId]
|
return false unless @_statesByAccount[acctId]
|
||||||
return false if _.isEmpty(@_statesByAccount[acctId])
|
|
||||||
if model
|
if model
|
||||||
return @_statesByAccount[acctId][model]?.complete ? false
|
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
|
continue unless _model in ModelsForSync
|
||||||
return false if not modelState.complete
|
return false if not modelState.complete
|
||||||
return true
|
return true
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue