mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-26 19:25:47 +03:00
Fix modal status page matching failing due to new instance url
This commit is contained in:
parent
d6d174b5c7
commit
7424f7604a
1 changed files with 3 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue