feat: add trycatch for handleDeepLinkPath

This commit is contained in:
Zamitto 2024-08-26 15:24:32 -03:00
parent 0bedb7c9b7
commit cc10186ec3

View file

@ -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);
}
};