Skip to content

Commit

Permalink
Merge pull request #16766 from newrelic/revert-16744-clark/asset-pref…
Browse files Browse the repository at this point in the history
…ix-issue

Revert "fix: update asset prefixing workaround"
  • Loading branch information
LizBaker authored Apr 2, 2024
2 parents 49c2974 + 15e8d05 commit 7ffcd51
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/@newrelic/gatsby-theme-newrelic/components/MDXLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ const MDXLink = ({ href, ...props }) => {

const brokenAssetPrefix = assetPrefix.replace('://', ':/');

if (href.includes(brokenAssetPrefix)) {
// eslint-disable-next-line prefer-template
cleanHref = href.replace(brokenAssetPrefix + '/', '');
if (href.startsWith(brokenAssetPrefix)) {
cleanHref = href.slice(brokenAssetPrefix.length);
}

return <Link to={cleanHref} {...props} />;
Expand Down

0 comments on commit 7ffcd51

Please sign in to comment.