Bug Report: Preload Links
-
The Preload Links feature is great at getting the website to generate cache files faster. However, there’s a bug in the code when dealing with relative URLs, which throws a console error:
Uncaught TypeError: Failed to construct ‘URL’: Invalid URL
at breeze-prefetch-links.min.js?ver=2.0.29:3:521So if there’s a link on the page that goes to
/help-center/
it would throw the above error and render the pageAs mentioned in this StackOverflow question, the URL constructor requires an absolute URL to work with. So
e.target.attributes.href.value
should be replaced withe.target.href
to retrieve the actual absolute URL rather than the relative URL that’s in the HTML.Hope this helps fix the bug!
David
- The topic ‘Bug Report: Preload Links’ is closed to new replies.