mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-14 20:22:10 +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,10 +86,15 @@ app.on("browser-window-created", (_, window) => {
|
|||
|
||||
const handleDeepLinkPath = (uri?: string) => {
|
||||
if (!uri) return;
|
||||
const url = new URL(uri);
|
||||
|
||||
if (url.host === "install-source") {
|
||||
WindowManager.redirect(`settings${url.search}`);
|
||||
try {
|
||||
const url = new URL(uri);
|
||||
|
||||
if (url.host === "install-source") {
|
||||
WindowManager.redirect(`settings${url.search}`);
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error("Error handling deep link", uri, error);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue