1
0
Fork 0

Fix modal status page matching failing due to new instance url

This commit is contained in:
Lim Chee Aun 2023-02-09 16:03:10 +08:00
parent d6d174b5c7
commit 7424f7604a

View file

@ -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 {