Browse Source

suppress warnings during vm instantiation

Evan You 9 years ago
parent
commit
b981e2d47a
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/index.js

+ 5 - 0
src/index.js

@@ -32,9 +32,14 @@ class Store {
       dispatch.apply(this, args)
       dispatch.apply(this, args)
     }
     }
     // use a Vue instance to store the state tree
     // use a Vue instance to store the state tree
+    // suppress warnings just in case the user has added
+    // some funky global mixins
+    const silent = Vue.config.silent
+    Vue.config.silent = true
     this._vm = new Vue({
     this._vm = new Vue({
       data: state
       data: state
     })
     })
+    Vue.config.silent = silent
     this._setupModuleState(state, modules)
     this._setupModuleState(state, modules)
     this._setupModuleMutations(modules)
     this._setupModuleMutations(modules)
     this._setupMiddlewares(middlewares, state)
     this._setupMiddlewares(middlewares, state)