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
1 changed files with 2 additions and 1 deletions

View File

@ -111,6 +111,7 @@ 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)
if (this.$nuxt)
this.$nuxt.fetchPayload(href).catch(() => {}) this.$nuxt.fetchPayload(href).catch(() => {})
} }
<% } %> <% } %>