Skip to content

Commit

Permalink
fix: do not pass legacyBehaviour to a as prop
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed May 30, 2022
1 parent 96cabcd commit 332e513
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/next/client/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ type LinkPropsReal = React.PropsWithChildren<

const Link = React.forwardRef<HTMLAnchorElement, LinkPropsReal>(
function LinkComponent(props, forwardedRef) {
const {
legacyBehavior = Boolean(process.env.__NEXT_NEW_LINK_BEHAVIOR) !== true,
} = props
if (process.env.NODE_ENV !== 'production') {
function createPropError(args: {
key: string
Expand Down Expand Up @@ -260,6 +257,7 @@ const Link = React.forwardRef<HTMLAnchorElement, LinkPropsReal>(
locale,
onClick,
onMouseEnter,
legacyBehavior = Boolean(process.env.__NEXT_NEW_LINK_BEHAVIOR) !== true,
...restProps
} = props

Expand Down

0 comments on commit 332e513

Please sign in to comment.