Skip to content

Commit

Permalink
remove usesInit condition
Browse files Browse the repository at this point in the history
- rename: init -> beforeCreate in v2.0.0-alpha.7
- it's not necessary in the next version
  • Loading branch information
ICELI committed Jun 7, 2017
1 parent 82efdd0 commit 804d802
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ export default function (Vue) {
const version = Number(Vue.version.split('.')[0])

if (version >= 2) {
const usesInit = Vue.config._lifecycleHooks.indexOf('init') > -1
Vue.mixin(usesInit ? { init: vuexInit } : { beforeCreate: vuexInit })
Vue.mixin({ beforeCreate: vuexInit })
} else {
// override init and inject vuex init procedure
// for 1.x backwards compatibility.
Expand Down

0 comments on commit 804d802

Please sign in to comment.