0👍
✅
https://firebase.google.com/docs/reference/js/firebase.User#updateprofile
Firebase’s user.updateProfile
method returns a void promise, meaning it returns a promise with no value.
You still have access to your user
variable in your then
, so why not just change it to
...
user
.updateProfile({
displayName: payload.name
})
.then(() => {
const User = {
id: user.uid,
email: user.email,
name:user.displayName
};
commit("settingUserIn", User);
commit("settingLoader", false);
});
...
Source:stackexchange.com