From dc177ab50580a5df971b0f1fbe539a9259b28139 Mon Sep 17 00:00:00 2001 From: Asher Date: Tue, 27 Oct 2020 17:38:54 -0500 Subject: [PATCH] Unambiguify address replacement Co-authored-by: Teffen Ellis --- src/node/entry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/entry.ts b/src/node/entry.ts index 3b95f9e90..890ad6ae8 100644 --- a/src/node/entry.ts +++ b/src/node/entry.ts @@ -161,7 +161,7 @@ const main = async (args: DefaultedArgs): Promise => { if (!args.socket && args.open) { // The web socket doesn't seem to work if browsing with 0.0.0.0. - const openAddress = serverAddress.replace(/:\/\/0.0.0.0/, "://localhost") + const openAddress = serverAddress.replace("://0.0.0.0", "://localhost") await open(openAddress).catch((error: Error) => { logger.error("Failed to open", field("address", openAddress), field("error", error)) })