ngneat / effects

🪄 A framework-agnostic RxJS effects implementation
https://www.netbasal.com
MIT License
63 stars 11 forks source link

fix(effects): {dispatchByDefault: true} takes precedence over {dispatch: false}, checkAction throws unexpectedly #25

Closed theorlovsky closed 2 years ago

theorlovsky commented 2 years ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #24

What is the new behavior?

  1. {dispatch: false} now actually cancels a dispatch from an effect, even when dispatchByDefault is set to true
  2. checkAction doesn't throw an unexpected error if void was dispatched from an effect by mistake, now it throws the expected TypeError

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

--