summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts
diff options
context:
space:
mode:
authorHazel K <acomputerdog@gmail.com>2024-10-01 14:44:34 -0400
committerHazel K <acomputerdog@gmail.com>2024-10-01 14:47:06 -0400
commit94ce7272a72b95d093d79164f4b3049e00323bb7 (patch)
treeb29be3b7d0bd652d510a805ac7c3e609eb0f86b0 /packages/frontend/src/scripts
parentrespect CWs in note summaries (diff)
downloadsharkey-94ce7272a72b95d093d79164f4b3049e00323bb7.tar.gz
sharkey-94ce7272a72b95d093d79164f4b3049e00323bb7.tar.bz2
sharkey-94ce7272a72b95d093d79164f4b3049e00323bb7.zip
avoid TS errors in get-note-summary
Diffstat (limited to 'packages/frontend/src/scripts')
-rw-r--r--packages/frontend/src/scripts/get-note-summary.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/frontend/src/scripts/get-note-summary.ts b/packages/frontend/src/scripts/get-note-summary.ts
index 85903231a4..d695b3a062 100644
--- a/packages/frontend/src/scripts/get-note-summary.ts
+++ b/packages/frontend/src/scripts/get-note-summary.ts
@@ -35,7 +35,7 @@ export const getNoteSummary = (note?: Misskey.entities.Note | null): string => {
}
// ファイルが添付されているとき
- if ((note.files || []).length !== 0) {
+ if (note.files && note.files.length !== 0) {
summary += ` (${i18n.tsx.withNFiles({ n: note.files.length })})`;
}