Skip to content

Commit dc177ab

Browse files
code-asherTeffen Ellis
andauthored
Unambiguify address replacement
Co-authored-by: Teffen Ellis <[email protected]>
1 parent cde94d5 commit dc177ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node/entry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const main = async (args: DefaultedArgs): Promise<void> => {
161161

162162
if (!args.socket && args.open) {
163163
// The web socket doesn't seem to work if browsing with 0.0.0.0.
164-
const openAddress = serverAddress.replace(/:\/\/0.0.0.0/, "://localhost")
164+
const openAddress = serverAddress.replace("://0.0.0.0", "://localhost")
165165
await open(openAddress).catch((error: Error) => {
166166
logger.error("Failed to open", field("address", openAddress), field("error", error))
167167
})

0 commit comments

Comments
 (0)