Skip to content

Commit 7774585

Browse files
committed
Cover condition for socketURL when returns empty string and pass condition for / assetPrefix
1 parent 94bbf32 commit 7774585

File tree

1 file changed

+1
-1
lines changed
  • packages/next/src/client/components/react-dev-overlay/internal/helpers

1 file changed

+1
-1
lines changed

packages/next/src/client/components/react-dev-overlay/internal/helpers/get-socket-url.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function getSocketUrl(assetPrefix: string): string {
1616
const protocol = getSocketProtocol(assetPrefix)
1717
const prefix = normalizedAssetPrefix(assetPrefix)
1818

19-
let url = `${protocol}://${hostname}:${port}${prefix ? `/${prefix}` : ''}`
19+
let url = `${protocol}://${hostname}:${port}${prefix && prefix !== '' ? `/${prefix}` : ''}`
2020

2121
if (prefix.startsWith('http')) {
2222
url = `${protocol}://${prefix.split('://', 2)[1]}`

0 commit comments

Comments
 (0)