The Home view contains two components. Filter and Results. The component Results depends heavily on the results of vuex store data that is affected by the Filter component. After the filters are applied and the user clicks on a button in Filter the needed data for Results is created in the store and this component should be then rendered below Filter.
Here is the problem. When I open the Home view, the Results component throws errors in the console like "TypeError: Cannot read property '0' of undefined". This is expected as the data does not exist yet. I tried to render Results conditionally with <Results v-if="$store.state.data != {}" />. This prevents the rendering when the user enters the page and renders Results once the data is loaded after the button is clicked, but nevertheless Results throws the same errors as before when the page is opened.
One potential solution I have is that I can enter dummy data in the store to prevent errors (and then render with other condition). But there must be a way that works without dummy data.