From 93b1de8ed98efaec9c0c1f3bb2443406d3b1f4c3 Mon Sep 17 00:00:00 2001 From: infiinte-persistence Date: Tue, 27 Oct 2020 14:39:31 +0800 Subject: [PATCH] Fix long tag query-URL when changing between [Trending|New|Top] ## Issue 4393: Tag query URL goes on indefinitely as you change between [Trending|New|Top] ## Change Change from `append` to `set` when building the query to remove duplicates. Flow hates null being not a string, so the FixMe was retained. --- ui/component/claimListHeader/view.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/component/claimListHeader/view.jsx b/ui/component/claimListHeader/view.jsx index cf8b20925..d76d52ca9 100644 --- a/ui/component/claimListHeader/view.jsx +++ b/ui/component/claimListHeader/view.jsx @@ -140,8 +140,8 @@ function ClaimListHeader(props: Props) { function buildUrl(delta) { const newUrlParams = new URLSearchParams(location.search); CS.KEYS.forEach(k => { - // $FlowFixMe append() can't take null as second arg, but get() can return null - if (urlParams.get(k) !== null) newUrlParams.append(k, urlParams.get(k)); + // $FlowFixMe get() can return null + if (urlParams.get(k) !== null) newUrlParams.set(k, urlParams.get(k)); }); switch (delta.key) {