From 45666af5e464ac850bd8ed0583fe1fe60ed4c189 Mon Sep 17 00:00:00 2001 From: Raphiiko Date: Thu, 21 Nov 2024 16:32:59 +0100 Subject: [PATCH] Fix deep link parsing, once again --- CHANGELOG.md | 1 + src-ui/app/services/deep-link.service.ts | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 210fc4de..c8b81ce5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Possible crash when encountering time issues on log cleanup +- Deep link parsing being broken, once again ## [1.14.6] diff --git a/src-ui/app/services/deep-link.service.ts b/src-ui/app/services/deep-link.service.ts index 16b180d9..1f34559c 100644 --- a/src-ui/app/services/deep-link.service.ts +++ b/src-ui/app/services/deep-link.service.ts @@ -29,10 +29,9 @@ export class DeepLinkService { private async handleDeepLinkCall(url: URL) { let pathname = url.pathname; - console.log(url); // Remove any leading slashes while (pathname.startsWith('/')) pathname = pathname.substring(1); - const route = [url.hostname, ...pathname.split('/')]; + const route = [url.hostname, ...pathname.split('/')].map((p) => p.trim()).filter(Boolean); switch (route[0]) { case 'integration': if (route.length < 2) break; @@ -49,6 +48,9 @@ export class DeepLinkService { break; default: await warn(`[DeepLinkService] Couldn't handle deep link type: ${route[0]}`); + await warn(`[DeepLinkService] - href: ${url.href}`); + await warn(`[DeepLinkService] - hostname: ${url.hostname}`); + await warn(`[DeepLinkService] - pathname: ${url.pathname}`); } }