From f4f6b1912b83b7cd59006f903a39799c1104a598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Sun, 17 May 2020 00:04:06 +0200 Subject: [PATCH] fix(vue-app): catch error on full static for store mutations [release] --- packages/vue-app/template/client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vue-app/template/client.js b/packages/vue-app/template/client.js index fb05985200..0811de97b9 100644 --- a/packages/vue-app/template/client.js +++ b/packages/vue-app/template/client.js @@ -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