prevent error page blinking for user

This commit is contained in:
Aldarund 2018-09-29 16:13:48 +03:00
parent 984031438c
commit 4a7945e7f4

View File

@ -147,6 +147,7 @@ async function loadAsyncComponents (to, from, next) {
// This may be due to a new deployment or a network problem
if (/^Loading chunk (\d)+ failed\./.test(message)) {
window.location.reload(true /* skip cache */)
return // prevent error page blinking for user
}
this.error({ statusCode, message })