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

Commit

Permalink
fix(nuxt): only observe tag elements for <NuxtLink> prefetching (#7679
Browse files Browse the repository at this point in the history
)
  • Loading branch information
danielroe committed Sep 20, 2022
1 parent 42c0862 commit 98ce2e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nuxt/src/app/components/nuxt-link.ts
Expand Up @@ -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
Expand Down

0 comments on commit 98ce2e6

Please sign in to comment.