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
dispatch interface returns pending promise instead of resolved #1668
Comments
As you synchronously log the Promise object, it is in pending state at that moment. It will be fulfilled immediately on the next tick. I'm not sure what is the problem on this behavior. |
@ktsn yep it's fulfilled on next tick so i think i'm wrong |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
3.1.2
Reproduction link
https://jsfiddle.net/jtzqmxk3/
Steps to reproduce
in this request insterface of dispatch changed
Look at this https://github.com/vuejs/vuex/pull/1115/files#diff-3bf35cd41da51153dcca3003656f7c67R139
it returns now pending promise for returned true from action instead of resolved. You can see it at jsfiddle console.
What is expected?
untouched Promise.resolve(true) returned by action wrapper
when no any action subscribers added
What is actually happening?
returned pending promise
also you can look at
#1572
which targets the same pull request
Perhaps I have bad assumptions. But behavior for trivial action response is not specified here https://vuex.vuejs.org/ru/guide/actions.html
The text was updated successfully, but these errors were encountered: