File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 56
56
"sinon-chai" : " ^2.8.0" ,
57
57
"todomvc-app-css" : " ^2.0.3" ,
58
58
"uglify-js" : " ^2.6.2" ,
59
- "vue" : " ^2.0.0-alpha.5 " ,
59
+ "vue" : " ^2.0.0-alpha.7 " ,
60
60
"vue-loader" : " ^9.0.3" ,
61
61
"webpack" : " ^1.12.8" ,
62
62
"webpack-dev-server" : " ^1.12.1"
Original file line number Diff line number Diff line change 1
1
import { getWatcher , getDep } from './util'
2
2
3
3
export default function ( Vue ) {
4
- var version = Number ( Vue . version . split ( '.' ) [ 0 ] )
4
+ const version = Number ( Vue . version . split ( '.' ) [ 0 ] )
5
5
6
6
if ( version >= 2 ) {
7
- Vue . mixin ( {
8
- init : vuexInit
9
- } )
7
+ const usesInit = Vue . config . _lifecycleHooks . indexOf ( 'init' ) > - 1
8
+ Vue . mixin ( usesInit ? { init : vuexInit } : { beforeCreate : vuexInit } )
10
9
} else {
11
10
// override init and inject vuex init procedure
12
11
// for 1.x backwards compatibility.
You can’t perform that action at this time.
0 commit comments