From e08c7fe9d46cbb3c382ac7c395d04a0451d6caee Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Tue, 5 Apr 2016 13:10:39 -0700 Subject: [PATCH] fix(notifs): _.reject does not support dict, Sentry 26699 --- .../notifications/lib/notifications-store.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal_packages/notifications/lib/notifications-store.coffee b/internal_packages/notifications/lib/notifications-store.coffee index 2973be6d9..8db3aef03 100644 --- a/internal_packages/notifications/lib/notifications-store.coffee +++ b/internal_packages/notifications/lib/notifications-store.coffee @@ -47,7 +47,9 @@ class NotificationStore extends NylasStore @listenTo Actions.postNotification, (data) => @_postNotification(new Notification(data)) @listenTo Actions.dismissNotificationsMatching, (criteria) => - @_notifications = _.reject @_notifications, (n) -> _.isMatch(n, criteria) + for tag, notif of @_notifications + if _.isMatch(notif, criteria) + delete @_notifications[tag] @trigger() ######### PUBLIC #######################################################