Skip to content

Commit

Permalink
use pathNoQueryHash
Browse files Browse the repository at this point in the history
  • Loading branch information
nkzawa committed Mar 7, 2022
1 parent 85da5ad commit cd299b4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/next/shared/lib/router/router.ts
Expand Up @@ -32,7 +32,6 @@ import {
} from '../utils'
import { isDynamicRoute } from './utils/is-dynamic'
import { parseRelativeUrl } from './utils/parse-relative-url'
import { parseUrl } from './utils/parse-url'
import { searchParamsToUrlQuery } from './utils/querystring'
import resolveRewrites from './utils/resolve-rewrites'
import { getRouteMatcher } from './utils/route-matcher'
Expand Down Expand Up @@ -1866,7 +1865,7 @@ export default class Router implements BaseRouter {
locale: string | undefined
isPreview: boolean
}): Promise<PreflightEffect> {
const asPathname = parseUrl(options.as).pathname
const asPathname = pathNoQueryHash(options.as)
const cleanedAs = delLocale(
hasBasePath(asPathname) ? delBasePath(asPathname) : asPathname,
options.locale
Expand Down

0 comments on commit cd299b4

Please sign in to comment.