diff options
Diffstat (limited to 'packages/frontend/src/scripts/get-note-summary.ts')
| -rw-r--r-- | packages/frontend/src/scripts/get-note-summary.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/frontend/src/scripts/get-note-summary.ts b/packages/frontend/src/scripts/get-note-summary.ts index 6fd9947ac1..85903231a4 100644 --- a/packages/frontend/src/scripts/get-note-summary.ts +++ b/packages/frontend/src/scripts/get-note-summary.ts @@ -23,13 +23,15 @@ export const getNoteSummary = (note?: Misskey.entities.Note | null): string => { return `(${i18n.ts.invisibleNote})`; } + if (note.cw != null) { + return `CW: ${note.cw}`; + } + let summary = ''; // 本文 - if (note.cw != null) { - summary += note.cw; - } else { - summary += note.text ? note.text : ''; + if (note.text) { + summary += note.text; } // ファイルが添付されているとき |