Skip to content

Commit

Permalink
add check before using router
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Feb 10, 2021
1 parent 4d31f14 commit b24a893
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/next/client/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ function Link(props: React.PropsWithChildren<LinkProps>) {
// we only render domain locales if we are currently on a domain locale
// so that locale links are still visitable in development/preview envs
const localeDomain =
router &&
router.isLocaleDomain &&
getDomainLocale(
as,
Expand Down

0 comments on commit b24a893

Please sign in to comment.