[Vuejs]-Is it possible to return a value of an inner object of the wrapper object in Vuex getter before mounting?

0👍

According to the error, you don’t have the _user property when you are trying to access it via vuex getter. I think you are fetching it from and API, as i understood.

On your state, set profile as empty/nested object with all fetchable properties to get rid of errors.

Like;

const state: {
  profile: {
    _user: { _id: null }
  }
}

Leave a comment