feat(app): hide error logs in production

This commit is contained in:
Pooya Parsa 2017-07-13 13:29:10 +04:30
parent 33fb5693d9
commit 0fece913e5

View File

@ -92,8 +92,10 @@ async function createApp (ssrContext) {
const _nuxt = this._nuxt || this.$options._nuxt
_nuxt.dateErr = Date.now()
_nuxt.err = err
console.error(err)
console.error('[nuxt] ' + err)
if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
console.error(err)
console.error('[nuxt] ' + err)
}
return err
}
},