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

fix(nuxt): only observe tag elements for <NuxtLink> prefetching #7679

Merged
merged 1 commit into from
Sep 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/nuxt/src/app/components/nuxt-link.ts
Original file line number Diff line number Diff line change
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