From 8223a069fefe16c479a821aad8fc3063befe9487 Mon Sep 17 00:00:00 2001 From: syuilo <Syuilotan@yahoo.co.jp> Date: Fri, 3 Dec 2021 17:47:44 +0900 Subject: [PATCH] fix(server): Fix #8032 --- CHANGELOG.md | 1 + packages/backend/src/models/repositories/user.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2164ecdbdf..01c0adecfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ - クライアント: モãƒã‚¤ãƒ«ã§ã‚¿ãƒƒãƒ—ã—ãŸã¨ãã«ãƒ„ールãƒãƒƒãƒ—ãŒè¡¨ç¤ºã•ã‚Œã‚‹å•é¡Œã‚’ä¿®æ£ - クライアント: リモートインスタンスã®ãƒŽãƒ¼ãƒˆã«è¿”ä¿¡ã™ã‚‹ã¨ãã€å¯¾è±¡ã®ãƒŽãƒ¼ãƒˆã«ãã®ãƒªãƒ¢ãƒ¼ãƒˆã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹å†…ã®ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¸ã®ãƒ¡ãƒ³ã‚·ãƒ§ãƒ³ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã¨ã€è¿”信テã‚スト内ã«ãƒãƒ¼ã‚«ãƒ«ãƒ¦ãƒ¼ã‚¶ãƒ¼ã¸ã®ãƒ¡ãƒ³ã‚·ãƒ§ãƒ³ã¨ã—ã¦å¼•ã継ãŒã‚Œã¦ã—ã¾ã†å ´åˆãŒã‚ã‚‹å•é¡Œã‚’ä¿®æ£ - クライアント: ç”»åƒãƒ“ューワーã§å…¨ä½“表示ã—ãŸæ™‚ã«ä¸Šå´ã®ä¸€éƒ¨ã—ã‹è¡¨ç¤ºã•ã‚Œãªã„ç”»åƒãŒã‚ã‚‹å•é¡Œã‚’ä¿®æ£ +- API: ユーザーをå–得時ã«æ¡ä»¶ã«ã‚ˆã£ã¦ã¯å†…部エラーã«ãªã‚‹å•é¡Œã‚’ä¿®æ£ ### Changes - クライアント: ノートã«ãƒ¢ãƒ‡ãƒ¬ãƒ¼ã‚¿ãƒ¼ãƒãƒƒã‚¸ã‚’表示ã™ã‚‹ã®ã‚’å»ƒæ¢ diff --git a/packages/backend/src/models/repositories/user.ts b/packages/backend/src/models/repositories/user.ts index fc0860970c..81468d6de2 100644 --- a/packages/backend/src/models/repositories/user.ts +++ b/packages/backend/src/models/repositories/user.ts @@ -189,12 +189,12 @@ export class UserRepository extends Repository<User> { const followingCount = profile == null ? null : (profile.ffVisibility === 'public') || (meId === user.id) ? user.followingCount : - (profile.ffVisibility === 'followers') && (relation!.isFollowing) ? user.followingCount : + (profile.ffVisibility === 'followers') && (relation && relation.isFollowing) ? user.followingCount : null; const followersCount = profile == null ? null : (profile.ffVisibility === 'public') || (meId === user.id) ? user.followersCount : - (profile.ffVisibility === 'followers') && (relation!.isFollowing) ? user.followersCount : + (profile.ffVisibility === 'followers') && (relation && relation.isFollowing) ? user.followersCount : null; const falsy = opts.detail ? false : undefined; -- GitLab