Skip to content

Commit 2ab3ccd

Browse files
Merge pull request JulianCataldo#85 from dkreuer/patch-1
Fix condition in HoverPrefetch.astro
2 parents 83c8049 + 2615c78 commit 2ab3ccd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/HoverPrefetch/HoverPrefetch.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if (typeof props.max !== 'number') {
1616
if (e.target.tagName === 'A' && prefetchList.length < max) {
1717
const url = e.target.getAttribute('href');
1818

19-
if (url.startsWith('/' && url !== window.location.pathname )) {
19+
if (url.startsWith('/') && url !== window.location.pathname) {
2020
if (prefetchList.includes(url) === false) {
2121
// console.log(`prefetching url ${url}`);
2222
const link = document.createElement('link');

0 commit comments

Comments
 (0)