From 785e80fefdb4905db8d5f5adf12556e8f7387261 Mon Sep 17 00:00:00 2001 From: Marie Date: Sun, 5 Nov 2023 03:31:30 +0100 Subject: [PATCH] chore: remove `as type` --- .../src/queue/processors/DeleteAccountProcessorService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/queue/processors/DeleteAccountProcessorService.ts b/packages/backend/src/queue/processors/DeleteAccountProcessorService.ts index 86c733f757..9ea00a8936 100644 --- a/packages/backend/src/queue/processors/DeleteAccountProcessorService.ts +++ b/packages/backend/src/queue/processors/DeleteAccountProcessorService.ts @@ -111,9 +111,9 @@ export class DeleteAccountProcessorService { cursor = reactions.at(-1)?.id ?? null; for (const reaction of reactions) { - const note = await this.notesRepository.findOneBy({ id: reaction.noteId }) as MiNote; + const note = await this.notesRepository.findOneBy({ id: reaction.noteId }); - await this.reactionService.delete(user, note); + if (note) await this.reactionService.delete(user, note); } }