fix: No need to use process.client here

This commit is contained in:
Sébastien Chopin 2018-09-23 11:00:58 +01:00 committed by GitHub
parent 0eb928eba9
commit be5e0571ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,7 +140,7 @@ async function loadAsyncComponents (to, from, next) {
next() next()
} catch (err) { } catch (err) {
err = err || {} err = err || {}
if (/^Loading chunk (\d)+ failed\./.test(err.message) && process.client) { if (/^Loading chunk (\d)+ failed\./.test(err.message)) {
window.location.replace(location.href) window.location.replace(location.href)
} }
const statusCode = (err.statusCode || err.status || (err.response && err.response.status) || 500) const statusCode = (err.statusCode || err.status || (err.response && err.response.status) || 500)