Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listener middleware triggers predicates for non-actions, despite typing #3371

Closed
EskiMojo14 opened this issue Apr 17, 2023 · 0 comments · Fixed by #3372
Closed

Listener middleware triggers predicates for non-actions, despite typing #3371

EskiMojo14 opened this issue Apr 17, 2023 · 0 comments · Fixed by #3372
Assignees
Labels
bug Something isn't working
Milestone

Comments

@EskiMojo14
Copy link
Collaborator

createListenerMiddleware calls its listener predicates for anything that's dispatched, regardless of whether it's an object. on the other hand, its typing assumes that it'll only ever be called with action objects.

it would probably make sense to only check listeners if it's actually an action (plain object with .type)

basic reproduction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants