From 4b217ea7369fdcdc4f54d9a73cf2ecd6dc1eb77f Mon Sep 17 00:00:00 2001 From: Evan Morikawa Date: Thu, 22 Oct 2015 14:10:11 -0700 Subject: [PATCH] fix(memory): don't return Promise to debounce in ContactStore Prevents a memory leak where it holds onto a stale references of the contactCache --- src/flux/stores/contact-store.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/flux/stores/contact-store.coffee b/src/flux/stores/contact-store.coffee index 3c70045f2..246014fb3 100644 --- a/src/flux/stores/contact-store.coffee +++ b/src/flux/stores/contact-store.coffee @@ -177,6 +177,8 @@ class ContactStore extends NylasStore @trigger() .catch (err) => console.warn("Request for Contacts failed. #{err}") + return true + _refreshCache: _.debounce(ContactStore::__refreshCache, 100) _sortContactsCacheWithRankings: =>