From 99e262ab8a239a40cd96d0f42834fdf22d782264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Wed, 31 May 2023 20:34:08 +0200 Subject: [PATCH] Fix shouldPersistSearch for Pleroma flake ids MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/features/compose/components/search.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/features/compose/components/search.tsx b/app/soapbox/features/compose/components/search.tsx index 3a3bdcd6b..87c0fa358 100644 --- a/app/soapbox/features/compose/components/search.tsx +++ b/app/soapbox/features/compose/components/search.tsx @@ -138,7 +138,7 @@ const Search = (props: ISearch) => { useEffect(() => { return () => { const newPath = history.location.pathname; - const shouldPersistSearch = !!newPath.match(/@.+\/posts\/\d+/g) + const shouldPersistSearch = !!newPath.match(/@.+\/posts\/[a-zA-Z0-9]+/g) || !!newPath.match(/\/tags\/.+/g); if (!shouldPersistSearch) {