diff --git a/src/pages/User/UserEditPage/index.tsx b/src/pages/User/UserEditPage/index.tsx index c9899f4..76a5743 100644 --- a/src/pages/User/UserEditPage/index.tsx +++ b/src/pages/User/UserEditPage/index.tsx @@ -168,8 +168,8 @@ export const UserEditPage = observer(() => { setEditUserData( editUserData.name || "", diff --git a/src/shared/store/UserStore/index.ts b/src/shared/store/UserStore/index.ts index 617031d..c748337 100644 --- a/src/shared/store/UserStore/index.ts +++ b/src/shared/store/UserStore/index.ts @@ -121,6 +121,7 @@ class UserStore { editUser = async (id: number) => { const payload = { ...this.editUserData }; if (!payload.icon) delete payload.icon; + if (!payload.password?.trim()) delete payload.password; const response = await authInstance.patch(`/user/${id}`, payload); runInAction(() => {