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

Unused callback parameter in registerAction method causing trouble when testing mapActions #1526

Open
FlorentinBurgeat opened this Issue Mar 19, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@FlorentinBurgeat
Copy link

FlorentinBurgeat commented Mar 19, 2019

Version

3.0.1

Reproduction link

}, payload, cb)

Steps to reproduce

  1. Create a component with method using mapActions
  2. Test call of the method
  3. Notice that the store action is called with 3 parameters: the store, the payload, and a unused callback always set to undefined.

What is expected?

The action must be called with only the 2 first parameters.

What is actually happening?

The action is called with a third parameters (cb) set to undefined.


I think this is an error. I don't see where it can be used.
I did not do a JSFiddle but linked you directly to the line where the potentially unused callback is.

@LinusBorg

This comment has been minimized.

Copy link
Member

LinusBorg commented Mar 23, 2019

What's the trouble that this is causing for you?

@FlorentinBurgeat

This comment has been minimized.

Copy link
Author

FlorentinBurgeat commented Apr 1, 2019

When I test that the method is called with my two first parameters (aka the store and payload), it fails because it expects a third parameter which is always undefined (aka 'cb').

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.