forked from AkkomaGang/admin-fe
chore: in dev disable errorLog
This commit is contained in:
parent
1e50d4a93b
commit
5bbb4abe21
1 changed files with 11 additions and 13 deletions
|
@ -2,9 +2,8 @@ import Vue from 'vue'
|
|||
import store from './store'
|
||||
|
||||
// you can set only in production env show the error-log
|
||||
// if (process.env.NODE_ENV === 'production') {
|
||||
|
||||
Vue.config.errorHandler = function(err, vm, info, a) {
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
Vue.config.errorHandler = function(err, vm, info, a) {
|
||||
// Don't ask me why I use Vue.nextTick, it just a hack.
|
||||
// detail see https://forum.vuejs.org/t/dispatch-in-vue-config-errorhandler-has-some-problem/23500
|
||||
Vue.nextTick(() => {
|
||||
|
@ -16,6 +15,5 @@ Vue.config.errorHandler = function(err, vm, info, a) {
|
|||
})
|
||||
console.error(err, info)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// }
|
||||
|
|
Loading…
Reference in a new issue