From 7424f7604a2bdd79803b2d1c4662bd47e4e039d9 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Thu, 9 Feb 2023 16:03:10 +0800 Subject: [PATCH] Fix modal status page matching failing due to new instance url --- src/app.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app.jsx b/src/app.jsx index cfc762ff..022ea801 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -143,7 +143,9 @@ function App() { const { prevLocation } = snapStates; const backgroundLocation = useRef(prevLocation || null); - const isModalPage = /^\/s\//i.test(location.pathname); + const isModalPage = + matchPath('/:instance/s/:id', location.pathname) || + matchPath('/s/:id', location.pathname); if (isModalPage) { if (!backgroundLocation.current) backgroundLocation.current = prevLocation; } else {