Skip to content

Commit e2504e2

Browse files
committed
ref(astro): Only require the pathname in the route provider
1 parent cb1e1e6 commit e2504e2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/astro/src/client/routeProvider.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function readRouteNameFromMeta(): string | undefined {
3131
* which is why `resolveRoute` refuses to answer for anything but the current path.
3232
*/
3333
export function createAstroRouteProvider(): RouteProvider {
34-
const isCurrentPath = (url: URL): boolean => url.pathname === WINDOW.location?.pathname;
34+
const isCurrentPath = (url: { pathname: string }): boolean => url.pathname === WINDOW.location?.pathname;
3535

3636
return {
3737
resolveRoute: url => (isCurrentPath(url) ? readRouteNameFromMeta() : undefined),

0 commit comments

Comments
 (0)