Skip to content

Commit d691ea9

Browse files
committed
misc: better comment
1 parent 9a770f8 commit d691ea9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/next/src/server/lib/router-server.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,8 +670,9 @@ export async function initialize(opts: {
670670
hmrPrefix = normalizedAssetPrefix(assetPrefix)
671671

672672
if (URL.canParse(hmrPrefix)) {
673-
// pathname without trailing slash
674-
// or if is '/', replace to '' to not conflict
673+
// remove trailing slash from pathname
674+
// return empty string if pathname is '/'
675+
// to avoid conflicts with '/_next' below
675676
hmrPrefix = new URL(hmrPrefix).pathname.replace(/\/$/, '')
676677
}
677678
}

0 commit comments

Comments
 (0)