fix(vue-app): nuxt-link prefetch error on fallback page (#7766)

This commit is contained in:
Yaroslav Vorobev 2020-07-27 16:44:10 +03:00 committed by GitHub
parent 6a2576b6f6
commit 66b4aa2f62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,8 @@ export default {
// Preload the data only if not in preview mode // Preload the data only if not in preview mode
if (!this.$root.isPreview) { if (!this.$root.isPreview) {
const { href } = this.$router.resolve(this.to, this.$route, this.append) const { href } = this.$router.resolve(this.to, this.$route, this.append)
this.$nuxt.fetchPayload(href).catch(() => {}) if (this.$nuxt)
this.$nuxt.fetchPayload(href).catch(() => {})
} }
<% } %> <% } %>
<% if (router.linkPrefetchedClass) { %> <% if (router.linkPrefetchedClass) { %>