diff --git a/packages/webui/routes/__root.tsx b/packages/webui/routes/__root.tsx index 75cf9236..b7b24c92 100644 --- a/packages/webui/routes/__root.tsx +++ b/packages/webui/routes/__root.tsx @@ -127,9 +127,9 @@ interface MyRouterContext { } export const Route = createRootRouteWithContext()({ - beforeLoad: async () => { + beforeLoad: async ({ location }) => { if (typeof window !== 'undefined') { - const pathname = window.location.pathname + const pathname = location.pathname const teamId = await resolveTeamIdFromPath(pathname) if (teamId) {