mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-15 04:32:13 +00:00
feat: add trycatch for handleDeepLinkPath
This commit is contained in:
parent
0bedb7c9b7
commit
cc10186ec3
1 changed files with 8 additions and 3 deletions
|
@ -86,11 +86,16 @@ app.on("browser-window-created", (_, window) => {
|
||||||
|
|
||||||
const handleDeepLinkPath = (uri?: string) => {
|
const handleDeepLinkPath = (uri?: string) => {
|
||||||
if (!uri) return;
|
if (!uri) return;
|
||||||
|
|
||||||
|
try {
|
||||||
const url = new URL(uri);
|
const url = new URL(uri);
|
||||||
|
|
||||||
if (url.host === "install-source") {
|
if (url.host === "install-source") {
|
||||||
WindowManager.redirect(`settings${url.search}`);
|
WindowManager.redirect(`settings${url.search}`);
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
logger.error("Error handling deep link", uri, error);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
app.on("second-instance", (_event, commandLine) => {
|
app.on("second-instance", (_event, commandLine) => {
|
||||||
|
|
Loading…
Reference in a new issue