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

On beforeEach Vuex store lost state after call next() #3333

Closed
phlegx opened this issue Oct 1, 2020 · 1 comment
Closed

On beforeEach Vuex store lost state after call next() #3333

phlegx opened this issue Oct 1, 2020 · 1 comment

Comments

@phlegx
Copy link

phlegx commented Oct 1, 2020

Version

3.4.5

Reproduction link

no link at the moment.

Steps to reproduce

  1. In the Vue router function router.beforeEach I check (with console.log) for a store state (e.g. store.getters['base/getLocale']). Output: de
  2. After the check I call next()
  3. In the loaded component from the new route I re-check this.$store.getters['base/getLocale'] and I get en that is default locale.

What is expected?

No Vuex state lost after next() call.

What is actually happening?

Lost of Vuex state after next() call.


It is a related issue to Vuex. But I don't know, if it is a vue-router bug, a Vuex bug or something else.

@phlegx phlegx changed the title On beforeEach vuex store lost state after call next() On beforeEach Vuex store lost state after call next() Oct 1, 2020
@posva
Copy link
Member

posva commented Oct 1, 2020

This is very unlikely to be related to vue router but if you manage to boils it down, please open a new issue with the boiled down reproduction

@posva posva closed this as completed Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants