update uri matching
attempt to cover malformed or incomplete uris Use RegExp to avoid escape character hell
This commit is contained in:
parent
60d6c84542
commit
42f76b79aa
1 changed files with 1 additions and 1 deletions
|
@ -460,7 +460,7 @@ function createMainWindow() {
|
|||
const uri = process.argv.find(arg => arg.startsWith("discord://"));
|
||||
|
||||
const loadUrl = (url: string | undefined) => {
|
||||
win.loadURL(`https://${subdomain}discord.com${url?.substring("discord://".length) || "/app"}`);
|
||||
win.loadURL(`https://${subdomain}discord.com/${url?.replace(RegExp("^discord://[^/]*/?"), "") || "app"}`);
|
||||
};
|
||||
|
||||
let uriFiredDarwin = false;
|
||||
|
|
Loading…
Reference in a new issue