From 4d4a4cec32b57eb4150af36aaed4ffbf8d6cc6e6 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Thu, 30 Jun 2016 11:04:51 -0700 Subject: [PATCH] Fix backwards logic preventing thread creation! --- packages/nylas-sync/imap/fetch-messages-in-category.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nylas-sync/imap/fetch-messages-in-category.js b/packages/nylas-sync/imap/fetch-messages-in-category.js index ce8aa540d..7a8b90b0d 100644 --- a/packages/nylas-sync/imap/fetch-messages-in-category.js +++ b/packages/nylas-sync/imap/fetch-messages-in-category.js @@ -246,7 +246,7 @@ class FetchMessagesInFolder { Message.find({where: {hash}}) .then((existing) => { - created = existing != null; + created = !existing; return existing ? existing.update(values) : Message.create(values); }) .then((message) =>