Skip to content

Commit

Permalink
refactor: use addBasePath in Router.prefetch
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Nov 9, 2021
1 parent 9120ee5 commit 3b923bf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/next/shared/lib/router/router.ts
Expand Up @@ -1697,7 +1697,7 @@ export default class Router implements BaseRouter {
}

const effects = await this._preflightRequest({
as: asPath,
as: addBasePath(asPath),
cache: true,
pages,
pathname,
Expand Down Expand Up @@ -1829,9 +1829,7 @@ export default class Router implements BaseRouter {
}

const preflight = await this._getPreflightData({
preflightHref: hasBasePath(options.as)
? options.as
: addBasePath(options.as),
preflightHref: options.as,
shouldCache: options.cache,
})

Expand Down

0 comments on commit 3b923bf

Please sign in to comment.