Fix duplicate user var from refactoring

This commit is contained in:
Kloon ImKloon 2023-09-07 15:29:30 +02:00
parent a1ca679c3c
commit 808cd1d20e
No known key found for this signature in database
GPG Key ID: CCF1C86A995C5B6A

View File

@ -97,7 +97,7 @@ export default {
},
inject: ["$showError", "$showSuccess"],
computed: {
...mapState(useAuthStore, ["user"]),
...mapState(useAuthStore, { sUser: "user" }),
...mapState(useLayoutStore, ["show"]),
...mapWritableState(useLayoutStore, ["loading"]),
isNew() {
@ -170,7 +170,7 @@ export default {
} else {
await api.update(user);
if (user.id === this.user.id) {
if (user.id === this.sUser.id) {
this.setUser({ ...cloneDeep(user) });
}