From 58abe15ec4efabf57c1cb9168ef91abedf6f1aef Mon Sep 17 00:00:00 2001 From: itoshi Date: Mon, 2 Feb 2026 15:58:27 +0300 Subject: [PATCH] fix: fix null password --- src/pages/User/UserEditPage/index.tsx | 2 +- src/shared/store/UserStore/index.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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(() => {