From 469cbad22b898ad25bb25c108350480b10ebc3c6 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Fri, 27 Jan 2017 13:50:27 -0800 Subject: [PATCH] [local-sync] Fix compilation of FetchNewMessagesInFolder operation Summary: This was broken because babel could not compile the `super` keyword Test Plan: manual Reviewers: evan, mark, halla Reviewed By: halla Differential Revision: https://phab.nylas.com/D3804 --- .../sync-tasks/fetch-new-messages-in-folder.imap.es6 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/local-sync/src/local-sync-worker/sync-tasks/fetch-new-messages-in-folder.imap.es6 b/packages/local-sync/src/local-sync-worker/sync-tasks/fetch-new-messages-in-folder.imap.es6 index 21d58bbaa..b1e40d26a 100644 --- a/packages/local-sync/src/local-sync-worker/sync-tasks/fetch-new-messages-in-folder.imap.es6 +++ b/packages/local-sync/src/local-sync-worker/sync-tasks/fetch-new-messages-in-folder.imap.es6 @@ -23,7 +23,10 @@ class FetchNewMessagesInFolderIMAP extends FetchMessagesInFolderIMAP { // Without a fetchedmax, can't tell what's new! // If we haven't fetched anything on this folder, let's run a normal fetch // operation - yield super.runTask(db, imap) + // Can't use `super` in this scenario because babel can't compile it under + // these conditions. User regular prototype instead + console.log(`🔚 📂 🆕$ {this._folder.name} has no fetchedmax - running regular fetch operation`) + yield FetchMessagesInFolderIMAP.prototype.runTask.call(this, db, imap) return }