0👍
✅
In your retrieveToken
mutation, you’re setting the state
object’s fname
and lname
properties both to data.name
, which you never define anywhere:
retrieveToken(state, data) {
state.user_id = data.user_id
state.fname = data.name
state.lname = data.name
state.email = data.email
state.type = data.type
state.token = data.access_token
}
I think you just want to set them to data.fname
and data.lname
respectively.
Source:stackexchange.com