Fix undefined turned into a "undefined" string due to string concat

This commit is contained in:
Lim Chee Aun 2023-02-17 11:28:25 +08:00
parent d8e6d349a0
commit e57b362ee0

View file

@ -323,7 +323,9 @@ function StatusPage() {
const closeLink = useMemo(() => {
const { prevLocation } = snapStates;
const pathname = prevLocation?.pathname + (prevLocation?.search || '');
const pathname =
(prevLocation?.pathname || '') + (prevLocation?.search || '');
console.log('X', typeof pathname);
if (
!pathname ||
matchPath('/:instance/s/:id', pathname) ||