Skip to content

Commit 1160801

Browse files
committed
chore: destructure localizedPath
1 parent 61ff711 commit 1160801

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

edge-runtime/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function handleMiddleware(
4040
.withRequestID(request.headers.get(InternalHeaders.NFRequestID))
4141

4242
const { nextRequest, nextContext } = buildNextRequest(request, context, nextConfig)
43-
const localizedPath = new URL(nextContext.localizedUrl).pathname
43+
const { pathname: localizedPath } = new URL(nextContext.localizedUrl)
4444

4545
// While we have already checked the path when mapping to the edge function,
4646
// Next.js supports extra rules that we need to check here too, because we

0 commit comments

Comments
 (0)