Skip to content

Commit

Permalink
Remove outdated comment about string children being deprecated in `ne…
Browse files Browse the repository at this point in the history
…xt/link` (#30606)

* Bring back accidentally lost deprecation warning for using string as a children for `next/link`

* Wrap warning with the env check

* Remove warning, just go with removed comment about deprecation
  • Loading branch information
Andarist authored Nov 19, 2021
1 parent e8ca334 commit 9ba31bb
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion packages/next/client/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ function Link(props: React.PropsWithChildren<LinkProps>) {

let { children, replace, shallow, scroll, locale } = props

// Deprecated. Warning shown by propType check. If the children provided is a string (<Link>example</Link>) we wrap it in an <a> tag
if (typeof children === 'string') {
children = <a>{children}</a>
}
Expand Down

0 comments on commit 9ba31bb

Please sign in to comment.