Skip to content

Commit b64766b

Browse files
ICELIyyx990803
authored andcommitted
remove usesInit condition (#824)
- rename: init -> beforeCreate in v2.0.0-alpha.7 - it's not necessary in the next version
1 parent 41a5cbd commit b64766b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/mixin.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ export default function (Vue) {
22
const version = Number(Vue.version.split('.')[0])
33

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

0 commit comments

Comments
 (0)