rsnext/test/e2e/404-page-router/app/middleware.js
Wyatt Johnson cba7070c08
Added support for query params on not found pages (#43836)
Previously, query parameters were not available on 404 pages because
calling the router methods would change the pathname in the browser.
This change adds support for the query to update for those pages without
updating the path to include the basePath.

This additionally narrows some Typescript types that were previous set
to `any` which highlighted some type errors that were corrected.

Fixes: https://github.com/vercel/next.js/issues/35990

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-12-12 16:10:44 -08:00

5 lines
106 B
JavaScript

import { NextResponse } from 'next/server'
export function middleware() {
return NextResponse.next()
}