Open mg-aceik opened 10 months ago
The internalLinkMatcher default matches media URLs which causes issues with query strings https://github.com/Sitecore/jss/blob/d4bc9e9c9ff9fa4a530950aa23ae854f1da16ea3/packages/sitecore-jss-nextjs/src/components/Link.tsx#L26
import { Link as JssLink, } from '@sitecore-jss/sitecore-jss-nextjs'; <JssLink field={field} />
Set the field to be a media link with query params.
Logic should not be calling down to NextLink, but it is.
const internalLinkMatcher = /^\/(?!(-\/media|-\/jssmedia))/;
@mg-aceik Thank you for submitting your contribution! I've added a ticket containing all the details. It has been added to our internal backlog for thorough review
Describe the Bug
The internalLinkMatcher default matches media URLs which causes issues with query strings https://github.com/Sitecore/jss/blob/d4bc9e9c9ff9fa4a530950aa23ae854f1da16ea3/packages/sitecore-jss-nextjs/src/components/Link.tsx#L26
To Reproduce
Set the field to be a media link with query params.
Expected Behavior
Logic should not be calling down to NextLink, but it is.
Possible Fix
const internalLinkMatcher = /^\/(?!(-\/media|-\/jssmedia))/;
Provide environment information