forked from daren.hsu/line_push
update
This commit is contained in:
+2
-1
@@ -7,7 +7,8 @@
|
||||
|
||||
<div class="title">{{ message }}</div>
|
||||
<p v-if="statusCode === 404" class="description">
|
||||
<NuxtLink class="error-link" to="/"><%= messages.back_to_home %></NuxtLink>
|
||||
<a v-if="typeof $route === 'undefined'" class="error-link" href="/"><% messages.back_to_home %></a>
|
||||
<NuxtLink v-else class="error-link" to="/"><%= messages.back_to_home %></NuxtLink>
|
||||
</p>
|
||||
<% if(debug) { %>
|
||||
<p class="description" v-else><%= messages.client_error_details %></p>
|
||||
|
||||
+3
-2
@@ -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()
|
||||
@@ -111,7 +111,8 @@ export default {
|
||||
// Preload the data only if not in preview mode
|
||||
if (!this.$root.isPreview) {
|
||||
const { href } = this.$router.resolve(this.to, this.$route, this.append)
|
||||
this.$nuxt.fetchPayload(href).catch(() => {})
|
||||
if (this.<%= globals.nuxt %>)
|
||||
this.<%= globals.nuxt %>.fetchPayload(href, true).catch(() => {})
|
||||
}
|
||||
<% } %>
|
||||
<% if (router.linkPrefetchedClass) { %>
|
||||
|
||||
Reference in New Issue
Block a user