Skip to content

Commit d5bab78

Browse files
committed
call getters and methods on instance
1 parent fe55af5 commit d5bab78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/override.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function (Vue) {
2020
options.computed = options.computed || {}
2121
Object.keys(state).forEach(key => {
2222
options.computed[key] = function vuexBoundGetter () {
23-
return state[key](this.$store.state)
23+
return state[key].call(this, this.$store.state)
2424
}
2525
})
2626
}
@@ -29,7 +29,7 @@ export default function (Vue) {
2929
options.methods = options.methods || {}
3030
Object.keys(actions).forEach(key => {
3131
options.methods[key] = function vuexBoundAction (...args) {
32-
return actions[key](this.$store, ...args)
32+
return actions[key].call(this, this.$store, ...args)
3333
}
3434
})
3535
}

0 commit comments

Comments
 (0)