mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
fix(vue-app): check that link.__prefetch
exists before calling it (#8608)
closes #8173
This commit is contained in:
parent
746b14319a
commit
3bba4c6a7f
@ -17,7 +17,7 @@ const cancelIdleCallback = window.cancelIdleCallback || function (id) {
|
||||
|
||||
const observer = window.IntersectionObserver && new window.IntersectionObserver((entries) => {
|
||||
entries.forEach(({ intersectionRatio, target: link }) => {
|
||||
if (intersectionRatio <= 0) {
|
||||
if (intersectionRatio <= 0 || !link.__prefetch) {
|
||||
return
|
||||
}
|
||||
link.__prefetch()
|
||||
|
Loading…
Reference in New Issue
Block a user