diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts index f968813197..acd2494131 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts @@ -90,7 +90,7 @@ export default class extends Endpoint { // eslint- const addedEmoji = await this.customEmojiService.add({ driveFile, name: nameNfc, - category: emoji.category?.normalize('NFC'), + category: emoji.category?.normalize('NFC') ?? null, aliases: emoji.aliases?.map(a => a.normalize('NFC')), host: null, license: emoji.license, diff --git a/packages/frontend/src/scripts/check-word-mute.ts b/packages/frontend/src/scripts/check-word-mute.ts index 8d3e96cea5..e65c327ffe 100644 --- a/packages/frontend/src/scripts/check-word-mute.ts +++ b/packages/frontend/src/scripts/check-word-mute.ts @@ -46,21 +46,21 @@ export function checkWordMute(note: Note, me: MeDetailed | null | undefined, mut function getNoteText(note: Note): string { const textParts: string[] = []; - if (note.cw) - textParts.push(note.cw); + if (note.cw) textParts.push(note.cw); - if (note.text) - textParts.push(note.text); + if (note.text) textParts.push(note.text); - if (note.files) - for (const file of note.files) - if (file.comment) - textParts.push(file.comment); + if (note.files) { + for (const file of note.files) { + if (file.comment) textParts.push(file.comment); + } + } - if (note.poll) - for (const choice of note.poll.choices) - if (choice.text) - textParts.push(choice.text); + if (note.poll) { + for (const choice of note.poll.choices) { + if (choice.text) textParts.push(choice.text); + } + } return textParts.join('\n').trim(); }