Initial state not loaded but getters or actions can be called in Vue2 #1376
Unanswered
mcube27
asked this question in
Help and Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Reproduction
Steps to reproduce the bug
Create a getter or an action that fetches ´state.schedules.schedules[state.viewType]´
In our case, on loading the app, the initial state has not been loaded, but the action or the getter already is trying to fetch the data.
It results in an exception because ´state.schedules.schedules´ has not the correct key.
Expected behavior
We should be able to know that when a getter or an action is called, the state is loaded.
Either with a method or because an action or getter always wait on that.
Actual behavior
Actions and getters ignore if the state is ready
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions