Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Feb 18, 2020
1 parent f9f0a99 commit c5508c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/next/client/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,10 @@ class Link extends Component<LinkProps> {
if (!this.p || typeof window === 'undefined') return
// Prefetch the JSON page if asked (only in the client)
const [href, asPath] = this.getPaths()
// make sure to catch here since we should have an unhandledRejection
// make sure to catch here since we should handle an unhandledRejection
// since we're doing this automatically and we don't want to reload the
// page while automatically prefetching for the user
// page while automatically prefetching for the user and this only occurs
// when doing an actual navigation
Router.prefetch(href, asPath, options).catch(() => {})
prefetched[href] = true
}
Expand Down

0 comments on commit c5508c4

Please sign in to comment.