mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 06:05:11 +00:00
fix(vue-app): catch error on full static for store mutations
[release]
This commit is contained in:
parent
7cf4edba60
commit
f4f6b1912b
@ -511,10 +511,10 @@ async function render (to, from, next) {
|
||||
<% } %>
|
||||
|
||||
<% if (isFullStatic && store) { %>
|
||||
// Replay store mutations
|
||||
// Replay store mutations, catching to avoid error page on SPA fallback
|
||||
promises.push(this.fetchPayload(to.path).then(payload => {
|
||||
payload.mutations.forEach(m => { this.$store.commit(m[0], m[1]) })
|
||||
}))
|
||||
}).catch(err => null))
|
||||
<% } %>
|
||||
|
||||
// Check disabled page loading
|
||||
|
Loading…
Reference in New Issue
Block a user