Skip to content
Snippets Groups Projects
Select Git revision
  • 9bc103042b4c515ce0b73dfba0f68b70b35c2ae0
  • master default protected
  • feature/reboot-instance
  • feature/add-docs-and-new-type
  • fix/statuses-by-instance
  • feature/update-server-configuration
  • feature/relays-management
  • feature/update-and-move-emoji-packs
  • fix/show-checkmarks-when-tag-applied
  • feature/apply-i18n-to-config
  • fix/objects-in-config
  • feature/filter-empty-config
  • fix/user-deletion
13 results

errorLog.js

Blame
  • Forked from Pleroma / admin-fe
    1232 commits behind the upstream repository.
    user avatar
    Pan authored
    5bbb4abe
    History
    errorLog.js 558 B
    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) {
      // 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(() => {
          store.dispatch('addErrorLog', {
            err,
            vm,
            info,
            url: window.location.href
          })
          console.error(err, info)
        })
      }
    }