From 98e0e57de7cb056bdf48f70121e4d483f730e364 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Fri, 28 Feb 2020 17:13:08 -0500 Subject: [PATCH] fix typo --- ui/component/claimListDiscover/view.jsx | 9 +++++---- ui/component/claimTilesDiscover/view.jsx | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ui/component/claimListDiscover/view.jsx b/ui/component/claimListDiscover/view.jsx index 2e83eaf6a..906d96980 100644 --- a/ui/component/claimListDiscover/view.jsx +++ b/ui/component/claimListDiscover/view.jsx @@ -204,10 +204,11 @@ function ClaimListDiscover(props: Props) { } if (!showReposts) { - options.claim_type = - options.claim_type === undefined - ? ['stream', 'channel'] - : options.claim_type.filter(claimType => claimType !== 'repost'); + if (Array.isArray(options.claim_type)) { + options.claim_type = options.claim_type.filter(claimType => claimType !== 'repost'); + } else { + options.claim_type = ['stream', 'channel']; + } } const hasMatureTags = tags && tags.some(t => MATURE_TAGS.includes(t)); diff --git a/ui/component/claimTilesDiscover/view.jsx b/ui/component/claimTilesDiscover/view.jsx index 98fff9214..b9c79e845 100644 --- a/ui/component/claimTilesDiscover/view.jsx +++ b/ui/component/claimTilesDiscover/view.jsx @@ -77,10 +77,11 @@ function ClaimTilesDiscover(props: Props) { } if (!showReposts) { - options.claim_type = - options.claim_type === undefined - ? ['stream', 'channel'] - : options.claim_type.filter(claimType => claimType !== 'repost'); + if (Array.isArray(options.claim_type)) { + options.claim_type = options.claim_type.filter(claimType => claimType !== 'repost'); + } else { + options.claim_type = ['stream', 'channel']; + } } if (claimType) {