mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(nuxt): only observe tag elements for <NuxtLink>
prefetching (#7679)
This commit is contained in:
parent
42c086223f
commit
98ce2e6492
@ -197,7 +197,7 @@ export function defineNuxtLink (options: NuxtLinkOptions) {
|
||||
let unobserve: Function | null = null
|
||||
onMounted(() => {
|
||||
idleId = requestIdleCallback(() => {
|
||||
if (el?.value) {
|
||||
if (el?.value?.tagName) {
|
||||
unobserve = observer!.observe(el.value, async () => {
|
||||
unobserve?.()
|
||||
unobserve = null
|
||||
|
Loading…
Reference in New Issue
Block a user