Skip to content

Commit

Permalink
Fix prefetch signature
Browse files Browse the repository at this point in the history
  • Loading branch information
talelmishali committed Dec 14, 2024
1 parent 19b6ab4 commit 3b1220f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export class Router {
return prefetchedRequests.findInFlight(this.getPrefetchParams(href, options))
}

public prefetch(href: string | URL, options: VisitOptions = {}, { cacheFor }: PrefetchOptions) {
public prefetch(href: string | URL, options: VisitOptions = {}, { cacheFor = 30 }: PrefetchOptions) {
if (options.method !== 'get') {
throw new Error('Prefetch requests must use the GET method')
}
Expand Down

0 comments on commit 3b1220f

Please sign in to comment.