[client-sync] Fix runtime error when getting sync activity for account

Summary:
Make sure SyncActivity.getLastSyncActivityForAccount returns a sensible
default to prevent runtime errors when the SyncProcessManager uses it

Test Plan: manual

Reviewers: evan, halla

Reviewed By: halla

Differential Revision: https://phab.nylas.com/D4366
This commit is contained in:
Juan Tejada 2017-04-05 13:10:31 -07:00
parent 3653a66be2
commit fc7856b4d0
2 changed files with 35 additions and 38 deletions

View file

@ -2,48 +2,45 @@
### 2.0.1 (4/5/2017) ### 2.0.1 (4/5/2017)
+ [iso-core] IMAPConnectionPool now correctly disposes connections - Features:
+ [client-sync] Prevent IMAP connection leaking in sync worker + Limit search to focused perspective
+ [cloud-worker] worker refactor
+ [cloud-\*] remove old SignalFX reporter & add docs - Fixes:
+ [cloud-workers] make log an not + IMAPConnectionPool now correctly disposes connections
+ [cloud-\*] log errors according to bunyan specs + Ensure we use refreshed access token for all imap connections during sync
+ [client-private-plugins] Rename onSendLater to onAssignSendLaterDate + Prevent IMAP connection leaking in sync worker
+ [client-sync] :art: logging + Fix send later button saving state and sending action
+ [client-app] Add better logging when restarting stuck sync worker + Fix inline images for send later
+ [iso-core] Remove unused vars from IMAPConnectionPool + Correctly enable plugins on 2.0.1
+ [client-plugins] Fix send later button saving state and sending action + Make sure app can update even after signing out of NylasID
+ [client-private-plugins] Don't syncback drafts for send later + Don't make any requests when NylasID isn't present
+ [cloud-workers] :art: linting
+ [client-sync] :art: sync worker - Cloud:
+ [client-app] Fix the unapply transformation for overlaid components + Make cloud workers more robust
+ [client-app] Allow the packageMigrationManager to re-enable packages + Remove old SignalFX reporter & add docs
+ [client-app] Make sure to fetch latest update url every time we check for updates + Log errors according to bunyan specs
+ [client-private-plugins] Don't record usage when changing feature time
+ [client-app] Prevent from making any requests when NylasID isn't present - Development:
+ [scripts] Batch upload each row + Add script to run benchmarks once per day at specified time
+ [client-app] Add script to run benchmarks once per day at specified time + Add script to upload benchmark data to Google Sheets
+ [scripts] Add script to upload benchmark data to Google Sheets + Add better logging when restarting stuck sync worker
+ [client-app] Fix benchmark script
+ [client-sync] Ensure we use refreshed access token for mail listener conn
+ [client-sync] Fix mail listener imap connection
+ [client-app] Remove sudo from benchmark-initial-sync.sh
+ [client-app] Limit search to focused perspective
### 2.0.0 (4/4/2017) ### 2.0.0 (4/4/2017)
+ Introducing Nylas Mail Pro Introducing Nylas Mail Pro
### 1.0.56 (4/4/2017) - Features:
+ Enable snooze, send later, and send reminders
+ Add feature limits to reminders and send later
+ [client-app] Fix sqlite build for older versions of clang - Fixes
+ [client-sync] Don't assign duplicate roles in folder fetch + Don't assign duplicate folder roles
+ [cloud-workers] fix worker exception + Re-setup IdentityStore in new window
+ [client-app] re-setup IdentityStore in new window
+ [client-app] add feature limits to reminders and send later - Development:
+ [client-app] enable snooze, send later, reminders on 1.0.56 + Fix sqlite build for older versions of clang
+ [client-app] Remove rogue scripts-tmp folder + Remove rogue scripts-tmp folder
+ [client-app] Remove unecessary db setup for mail rules + Remove unecessary db setup for mail rules
### 1.0.55 (3/31/2017) ### 1.0.55 (3/31/2017)

View file

@ -18,7 +18,7 @@ class SyncActivity {
} }
getLastSyncActivityForAccount = (accountId) => { getLastSyncActivityForAccount = (accountId) => {
return this._lastActivityByAccountId[accountId] return this._lastActivityByAccountId[accountId] || {}
} }
getLastSyncActivity = () => { getLastSyncActivity = () => {