]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Fix notification filter bar incorrectly filtering gaps
authorThibG <thib@sitedethib.com>
Wed, 16 Sep 2020 18:17:16 +0000 (20:17 +0200)
committerThibaut Girka <thib@sitedethib.com>
Mon, 28 Sep 2020 12:59:10 +0000 (14:59 +0200)
Port aab867b0e8119ecee78dabe8007f3c033e734b6d to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
app/javascript/flavours/glitch/features/notifications/index.js

index 68132386004d0b138d7f1032847aee9338cf414a..475968caa6dc382751f8a9c1709008201c99bed8 100644 (file)
@@ -48,7 +48,7 @@ const getNotifications = createSelector([
     // we need to turn it off for FilterBar in order not to block ourselves from seeing a specific category
     return notifications.filterNot(item => item !== null && excludedTypes.includes(item.get('type')));
   }
-  return notifications.filter(item => item !== null && allowedType === item.get('type'));
+  return notifications.filter(item => item === null || allowedType === item.get('type'));
 });
 
 const mapStateToProps = state => ({