For page not loading when logged out

Because path is undefined
pull/54/head
Lim Chee Aun 2023-02-11 19:36:28 +08:00
rodzic d9564bff72
commit 55d8908cf5
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -19,7 +19,7 @@ export default function useTitle(title, path) {
let matched = false; let matched = false;
if (paths.length) { if (paths.length) {
matched = paths.some((p) => matchPath(p, currentLocation)); matched = paths.some((p) => matchPath(p, currentLocation));
} else { } else if (path) {
matched = matchPath(path, currentLocation); matched = matchPath(path, currentLocation);
} }
console.debug({ paths, matched, currentLocation }); console.debug({ paths, matched, currentLocation });