mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(nuxt): avoid preloading external routes (#8255)
This commit is contained in:
parent
931ebec376
commit
a90b303d97
@ -204,7 +204,7 @@ export function defineNuxtLink (options: NuxtLinkOptions) {
|
|||||||
unobserve = null
|
unobserve = null
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
nuxtApp.hooks.callHook('link:prefetch', to.value as string).catch(() => {}),
|
nuxtApp.hooks.callHook('link:prefetch', to.value as string).catch(() => {}),
|
||||||
preloadRouteComponents(to.value as string, router).catch(() => {})
|
!isExternal.value && preloadRouteComponents(to.value as string, router).catch(() => {})
|
||||||
])
|
])
|
||||||
prefetched.value = true
|
prefetched.value = true
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user