chore: remove `as type`

This commit is contained in:
Marie 2023-11-05 03:31:30 +01:00 committed by GitHub
parent 82d70282e5
commit 785e80fefd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}
}