Fixed default page not letting you go home

This commit is contained in:
WardPearce
2025-02-16 17:38:16 +13:00
parent 67579d24ea
commit c6c2dbca12
+7 -6
View File
@@ -21,13 +21,19 @@ export async function load({ url }) {
} catch { }
}
if (browser) {
locale.set(window.navigator.language);
}
await waitLocale();
const defaultPage = get(interfaceDefaultPage);
if (
defaultPage &&
defaultPage !== '/' &&
defaultPage.startsWith('/') &&
url.pathname === '/'
url.pathname === '/' &&
window.history.length < 3
) {
getPages().forEach((page) => {
if (page.href === defaultPage && (!page.requiresAuth || get(authStore))) {
@@ -35,9 +41,4 @@ export async function load({ url }) {
}
});
}
if (browser) {
locale.set(window.navigator.language);
}
await waitLocale();
}