Last active
December 30, 2021 19:53
-
-
Save haigopi/07aadee679cd8920bb5e621fe163bc03 to your computer and use it in GitHub Desktop.
ChunkLoadError
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.onError(error => { | |
console.error(error); | |
Vue.prototype.$log.error('Failure Reason: ', error.message, error); | |
if (/ChunkLoadError:.*failed./i.test(error.message)) { | |
Vue.prototype.$log.error('Reloading Window 1'); | |
window.location.reload(); | |
} | |
else if (/Loading.*chunk.*failed./i.test(error.message)) { | |
Vue.prototype.$log.error('Reloading Window 2'); | |
window.location.reload(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment