From cc8812d7511a5bb5896c3c88982f1b1e01956e72 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Wed, 30 Mar 2022 09:17:26 +0800 Subject: [PATCH] ClaimListDiscover: fix broken `excludeUris` logic --- ui/component/claimListDiscover/view.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/component/claimListDiscover/view.jsx b/ui/component/claimListDiscover/view.jsx index af8a38530..a76b02f2b 100644 --- a/ui/component/claimListDiscover/view.jsx +++ b/ui/component/claimListDiscover/view.jsx @@ -526,7 +526,7 @@ function ClaimListDiscover(props: Props) { // --- direct uris finalUris = uris; injectPinUrls(finalUris, orderParam, pins); - filterExcludedUris(finalUris, excludeUris); + finalUris = filterExcludedUris(finalUris, excludeUris); } else { // --- searched uris if (isUnfetchedClaimSearch && prevUris.current) { @@ -534,7 +534,7 @@ function ClaimListDiscover(props: Props) { } else { finalUris = claimSearchResult; injectPinUrls(finalUris, orderParam, pins); - filterExcludedUris(finalUris, excludeUris); + finalUris = filterExcludedUris(finalUris, excludeUris); prevUris.current = finalUris; } } @@ -632,8 +632,9 @@ function ClaimListDiscover(props: Props) { function filterExcludedUris(uris, excludeUris) { if (uris && excludeUris && excludeUris.length) { - uris = uris.filter((uri) => !excludeUris.includes(uri)); + return uris.filter((uri) => !excludeUris.includes(uri)); } + return uris; } // **************************************************************************