From c07697458a417db9dab675124edc6cbe18e3fe24 Mon Sep 17 00:00:00 2001 From: FabianLars Date: Tue, 5 Nov 2024 18:50:23 +0100 Subject: [PATCH] fix(deep-link): Remove getCurrent call in onOpenUrl --- .changes/fix-deep-link-onopenurl-current.md | 5 +++++ plugins/deep-link/guest-js/index.ts | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 .changes/fix-deep-link-onopenurl-current.md diff --git a/.changes/fix-deep-link-onopenurl-current.md b/.changes/fix-deep-link-onopenurl-current.md new file mode 100644 index 00000000..c128c594 --- /dev/null +++ b/.changes/fix-deep-link-onopenurl-current.md @@ -0,0 +1,5 @@ +--- +deep-link-js: patch +--- + +`onOpenUrl()` will now not call `getCurrent()` anymore, matching the documented behavior. diff --git a/plugins/deep-link/guest-js/index.ts b/plugins/deep-link/guest-js/index.ts index 49afbab7..c9190d7a 100644 --- a/plugins/deep-link/guest-js/index.ts +++ b/plugins/deep-link/guest-js/index.ts @@ -99,11 +99,6 @@ export async function isRegistered(protocol: string): Promise { export async function onOpenUrl( handler: (urls: string[]) => void ): Promise { - const current = await getCurrent() - if (current) { - handler(current) - } - return await listen('deep-link://new-url', (event) => { handler(event.payload) })