Unambiguify address replacement

Co-authored-by: Teffen Ellis <TeffenEllis@users.noreply.github.com>
This commit is contained in:
Asher 2020-10-27 17:38:54 -05:00 committed by GitHub
parent cde94d5ed4
commit dc177ab505
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ const main = async (args: DefaultedArgs): Promise<void> => {
if (!args.socket && args.open) { if (!args.socket && args.open) {
// The web socket doesn't seem to work if browsing with 0.0.0.0. // 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) => { await open(openAddress).catch((error: Error) => {
logger.error("Failed to open", field("address", openAddress), field("error", error)) logger.error("Failed to open", field("address", openAddress), field("error", error))
}) })