Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix: only include external urls in speculation list
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Oct 17, 2022
1 parent 6e40b0e commit 8eec1b4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default defineNuxtPlugin((nuxtApp) => {
})
nuxtApp.hook('link:prefetch', (url) => {
const { protocol } = parseURL(url)
if (!protocol || ['http:', 'https:'].includes(protocol)) {
if (protocol && ['http:', 'https:'].includes(protocol)) {
externalURLs.value.add(url)
}
})
Expand Down

0 comments on commit 8eec1b4

Please sign in to comment.