Skip to content

Commit

Permalink
fix: check correct layout when navigating from error
Browse files Browse the repository at this point in the history
Resolves #7567
  • Loading branch information
Atinux committed Jun 23, 2020
1 parent bc6612b commit 6332aaa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/vue-app/template/client.js
Expand Up @@ -598,7 +598,11 @@ function normalizeComponents (to, ___) {
<% if (features.layouts) { %>
function setLayoutForNextPage (to) {
// Set layout
let layout = this.$options.nuxt.err
let hasError = Boolean(this.$options.nuxt.err)
if (this._hadError && this._dateLastError === this.$options.nuxt.dateErr) {
hasError = false
}
let layout = hasError
? (NuxtError.options || NuxtError).layout
: to.matched[0].components.default.options.layout

Expand Down

0 comments on commit 6332aaa

Please sign in to comment.