Skip to content

Commit 9381d46

Browse files
author
Mike Bishop
committed
fix(electron): "::" address causes blank local display
When config.address is set to "::" (listen on all interfaces), the Electron window tries to load http://:::8080 instead of http://localhost:8080, resulting in a blank local display. The remap that converts wildcard bind addresses to "localhost" for the Electron loadURL call already handled undefined, "", and "0.0.0.0", but was missing "::". Add it.
1 parent fb41d24 commit 9381d46

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

js/electron.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function createWindow () {
100100
prefix = "http://";
101101
}
102102

103-
let address = (config.address === void 0) | (config.address === "") | (config.address === "0.0.0.0") ? (config.address = "localhost") : config.address;
103+
let address = (config.address === void 0) | (config.address === "") | (config.address === "0.0.0.0") | (config.address === "::") ? (config.address = "localhost") : config.address;
104104
const port = process.env.MM_PORT || config.port;
105105
mainWindow.loadURL(`${prefix}${address}:${port}`);
106106

0 commit comments

Comments
 (0)