For page not loading when logged out

Because path is undefined
This commit is contained in:
Lim Chee Aun 2023-02-11 19:36:28 +08:00
parent d9564bff72
commit 55d8908cf5

View file

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