diff --git a/packages/backend/src/services/following/create.ts b/packages/backend/src/services/following/create.ts index 635d706fc5..61a8c6b268 100644 --- a/packages/backend/src/services/following/create.ts +++ b/packages/backend/src/services/following/create.ts @@ -209,12 +209,12 @@ export default async function ( await Blockings.delete(blocking.id); } else { // それ以外は単純に例外 - if (blocking != null) + if (blocking) throw new IdentifiableError( "710e8fb0-b8c3-4922-be49-d5d93d8e6a6e", "blocking", ); - if (blocked != null) + if (blocked) throw new IdentifiableError( "3338392a-f764-498d-8855-db939dcf8c48", "blocked", diff --git a/packages/backend/src/services/following/requests/create.ts b/packages/backend/src/services/following/requests/create.ts index 0833f2aeb2..8b2e86ab5b 100644 --- a/packages/backend/src/services/following/requests/create.ts +++ b/packages/backend/src/services/following/requests/create.ts @@ -38,8 +38,8 @@ export default async function ( }), ]); - if (blocking != null) throw new Error("blocking"); - if (blocked != null) throw new Error("blocked"); + if (blocking) throw new Error("blocking"); + if (blocked) throw new Error("blocked"); const followRequest = await FollowRequests.insert({ id: genId(),