fix(notifs): _.reject does not support dict, Sentry 26699

This commit is contained in:
Ben Gotow 2016-04-05 13:10:39 -07:00
parent e311f0cb61
commit 792c0e61f1

View file

@ -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 #######################################################