fix(deep-link): Remove getCurrent call in onOpenUrl

pull/2008/head
FabianLars 9 months ago
parent 57f69c6615
commit c07697458a
No known key found for this signature in database

@ -0,0 +1,5 @@
---
deep-link-js: patch
---
`onOpenUrl()` will now not call `getCurrent()` anymore, matching the documented behavior.

@ -99,11 +99,6 @@ export async function isRegistered(protocol: string): Promise<boolean> {
export async function onOpenUrl( export async function onOpenUrl(
handler: (urls: string[]) => void handler: (urls: string[]) => void
): Promise<UnlistenFn> { ): Promise<UnlistenFn> {
const current = await getCurrent()
if (current) {
handler(current)
}
return await listen<string[]>('deep-link://new-url', (event) => { return await listen<string[]>('deep-link://new-url', (event) => {
handler(event.payload) handler(event.payload)
}) })

Loading…
Cancel
Save