Skip to content

Commit

Permalink
- Update next release version 0.20.2
Browse files Browse the repository at this point in the history
- Dispatch Saga Action into vuex by default
  • Loading branch information
albertleigh committed Nov 19, 2019
1 parent 1c7a31f commit ca598a4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## [0.20.2] 2019-11-19
- Dispatch Saga Action into vuex by default
## [0.20.1] 2019-11-11
- Fix few typos
- Fix module definition bug
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,5 +215,5 @@ crisis of handling changing requirements in my previous projects.

[LICENSE]: ./LICENSE.md
[CHANGELOG]: ./CHANGELOG.md
[version-badge]: https://img.shields.io/badge/version-0.20.1-blue.svg
[version-badge]: https://img.shields.io/badge/version-0.20.2-blue.svg
[license-badge]: https://img.shields.io/badge/license-MIT-green.svg
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vuex-saga-ts",
"version": "0.20.1",
"version": "0.20.2",
"description": "Nothing but a simple plugin connecting redux-saga in ts with some utils",
"main": "index.ts",
"scripts": {
Expand Down
10 changes: 8 additions & 2 deletions src/VuexSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ export function VuexSaga<
return (store:Store<State>) => {
const channel = stdChannel();
// eslint-disable-next-line no-param-reassign
(store as any ).sagaDispatch = (type, payload={}) => channel.put({ type, payload });
(store as any ).sagaDispatchAction = (action:Action) => channel.put(action);
(store as any ).sagaDispatch = (type, payload={}) => {
store.commit({ type, payload });
return channel.put({ type, payload })
};
(store as any ).sagaDispatchAction = (action:Action) =>{
store.commit(action);
return channel.put(action)
};
runSaga(
{
channel,
Expand Down

0 comments on commit ca598a4

Please sign in to comment.