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

View File

@ -7,7 +7,8 @@
<div class="title">{{ message }}</div> <div class="title">{{ message }}</div>
<p v-if="statusCode === 404" class="description"> <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> </p>
<% if(debug) { %> <% if(debug) { %>
<p class="description" v-else><%= messages.client_error_details %></p> <p class="description" v-else><%= messages.client_error_details %></p>