From 6202a4618e62e96bcd2b478df32635fc5be8b621 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Tue, 28 Mar 2017 15:54:56 -0700 Subject: [PATCH] [client-sync] Fix runtime error introduced in 08975c0 Summary: If `gmailInitialUIDsRemaining` was defined, we need to set `initialUids` to that value. We were previously setting it to a key in `folder.syncState` that didn't exist, which caused a runtime error. This was introduced in https://github.com/nylas/nylas-mail-all/commit/d6a2b6935cddefb7ab8f4f99d6ce118fd6191aab Test Plan: manual Reviewers: spang, mark Reviewed By: mark Differential Revision: https://phab.nylas.com/D4279 --- .../sync-tasks/fetch-messages-in-folder.imap.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client-sync/src/local-sync-worker/sync-tasks/fetch-messages-in-folder.imap.es6 b/packages/client-sync/src/local-sync-worker/sync-tasks/fetch-messages-in-folder.imap.es6 index 3274f9676..cb8a3a874 100644 --- a/packages/client-sync/src/local-sync-worker/sync-tasks/fetch-messages-in-folder.imap.es6 +++ b/packages/client-sync/src/local-sync-worker/sync-tasks/fetch-messages-in-folder.imap.es6 @@ -405,7 +405,7 @@ class FetchMessagesInFolderIMAP extends SyncTask { fetchedmax: this._box.uidnext, }); } else { - initialUids = this._folder.syncState.gmailInitialUIDsRemaining; + initialUids = gmailInitialUIDsRemaining } // continue fetching new mail first in the case that inbox uid download // takes multiple batches