From 787404638addb83a567fb59b4f871931f11bc5af Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 10 Mar 2023 18:48:57 +0900 Subject: [PATCH] =?UTF-8?q?fix(client):=20=E3=83=97=E3=83=AD=E3=83=95?= =?UTF-8?q?=E3=82=A3=E3=83=BC=E3=83=AB=E3=81=A7=E8=A8=AD=E5=AE=9A=E3=81=97?= =?UTF-8?q?=E3=81=9F=E6=83=85=E5=A0=B1=E3=81=8C=E5=89=8A=E9=99=A4=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #10279 --- CHANGELOG.md | 1 + packages/frontend/src/pages/settings/profile.vue | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f72830776..4ef13da57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ You should also include the user name that made the change. - Playのソースコード上限文字数を2倍に拡張 ### Bugfixes +- プロフィールで設定した情報が削除できない問題を修正 - ロールで広告を無効にするとadmin/adsでプレビューがでてこない問題を修正 - /api-consoleページにアクセスすると404が出る問題を修正 - SMTP Login id length is too short diff --git a/packages/frontend/src/pages/settings/profile.vue b/packages/frontend/src/pages/settings/profile.vue index 4776a87d5..a5f6c11f8 100644 --- a/packages/frontend/src/pages/settings/profile.vue +++ b/packages/frontend/src/pages/settings/profile.vue @@ -134,11 +134,17 @@ function saveFields() { function save() { os.apiWithDialog('i/update', { - name: profile.name ?? null, - description: profile.description ?? null, - location: profile.location ?? null, - birthday: profile.birthday ?? null, - lang: profile.lang ?? null, + // 空文字列をnullにしたいので??は使うな + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + name: profile.name || null, + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + description: profile.description || null, + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + location: profile.location || null, + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + birthday: profile.birthday || null, + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + lang: profile.lang || null, isBot: !!profile.isBot, isCat: !!profile.isCat, showTimelineReplies: !!profile.showTimelineReplies,