fix(vue-app): use anchor to `/` if route is undefined in error page (#7877)

This commit is contained in:
Ahad Birang 2020-08-15 02:28:17 +04:30 committed by GitHub
parent ec9a78a3d2
commit 10e82b24da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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>