From cfaed183aadc4306cec2a2004c20c5b107467a7a Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 29 Apr 2019 21:10:34 -0500 Subject: filter prop is sometimes `undefined` i guess??? --- app/javascript/flavours/glitch/selectors/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript/flavours/glitch/selectors') diff --git a/app/javascript/flavours/glitch/selectors/index.js b/app/javascript/flavours/glitch/selectors/index.js index 2f8492942..01f318108 100644 --- a/app/javascript/flavours/glitch/selectors/index.js +++ b/app/javascript/flavours/glitch/selectors/index.js @@ -42,7 +42,7 @@ const escapeRegExp = string => string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string export const regexFromFilters = (status, filters) => { - if (filters.size === 0) { return null; } + if (filters === undefined || filters.size === 0) { return null; } let has_media = status.get('media_attachments').size > 0; -- cgit