From 97729307621958306e411161922e1dab2bdc8f07 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Tue, 30 Jul 2024 17:52:37 +0900 Subject: [PATCH] fix --- packages/backend/src/server/api/endpoints/i/update.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 3c5b02d4bb..b03528289d 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -479,14 +479,14 @@ export default class extends Endpoint { // eslint- //#region 変更されていないプロパティを削除 const _updates = getObjKeys(updates).reduce>((acc, key) => { - if (updates[key] != null && updates[key] !== user[key]) { + if (updates[key] !== undefined && updates[key] !== user[key]) { (acc[key] as MiUser[typeof key]) = updates[key]; } return acc; }, {}); const _profileUpdates = getObjKeys(profileUpdates).reduce>((acc, key) => { - if (profileUpdates[key] != null && profileUpdates[key] !== profile[key]) { + if (profileUpdates[key] !== undefined && profileUpdates[key] !== profile[key]) { (acc[key] as MiUserProfile[typeof key]) = profileUpdates[key]; } return acc;