about summary refs log tree commit diff
path: root/app/javascript/flavours
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-05-15 13:12:55 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:23 -0500
commit89c5d8ec4e5798763de44adec79e6e065bb59b9c (patch)
tree46d46176caf8d283955aab703b768bfd4c293288 /app/javascript/flavours
parenta680595ecb6b0d0fb1f8931585187f61c4e32874 (diff)
Custom filters: resolve bug where filter is erronously ignored when media filtering flags are unset.
Diffstat (limited to 'app/javascript/flavours')
-rw-r--r--app/javascript/flavours/glitch/selectors/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/selectors/index.js b/app/javascript/flavours/glitch/selectors/index.js
index 01f318108..e785a7d68 100644
--- a/app/javascript/flavours/glitch/selectors/index.js
+++ b/app/javascript/flavours/glitch/selectors/index.js
@@ -44,10 +44,10 @@ const escapeRegExp = string =>
 export const regexFromFilters = (status, filters) => {
   if (filters === undefined || filters.size === 0) { return null; }
 
-  let has_media = status.get('media_attachments').size > 0;
+  let has_media = status.get('media_attachments').size !== 0;
 
   filters = filters.filter(filter => {
-    return (!has_media && filter.get('exclude_media')) || (has_media && filter.get('media_only'))
+    return (!has_media && filter.get('exclude_media')) || (has_media && filter.get('media_only')) || (!filter.get('exclude_media') && !filter.get('media_only'))
   });
 
   if (filters.size === 0) { return null; }