Skip to content

Commit

Permalink
Remove checks
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroborges committed Oct 16, 2024
1 parent 611c7d5 commit 9d9b50d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/svelte/src/usePrefetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,8 @@ export default function usePrefetch(options: VisitOptions = {}) {
})

onDestroy(() => {
if (removePrefetchedListener) {
removePrefetchedListener()
}

if (removePrefetchingListener) {
removePrefetchingListener()
}
removePrefetchedListener?.()
removePrefetchingListener?.()
})

return {
Expand Down

0 comments on commit 9d9b50d

Please sign in to comment.