fix: summary if 1 attachment

This commit is contained in:
ThatOneCalculator 2023-06-02 23:55:31 -07:00
parent 2ec387de4a
commit 99df1dcbd7
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ export const getNoteSummary = (note: Packed<"Note">): string => {
// ファイルが添付されているとき // ファイルが添付されているとき
if ((note.files || []).length !== 0) { if ((note.files || []).length !== 0) {
const len = note.files?.length; const len = note.files?.length;
summary += ` 📎 (${len !== 1 ? len : ""})`; summary += ` 📎${len !== 1 ? ` (${len})` : ""}`;
} }
// 投票が添付されているとき // 投票が添付されているとき

View File

@ -24,7 +24,7 @@ export const getNoteSummary = (note: misskey.entities.Note): string => {
// ファイルが添付されているとき // ファイルが添付されているとき
if ((note.files || []).length !== 0) { if ((note.files || []).length !== 0) {
const len = note.files?.length; const len = note.files?.length;
summary += ` 📎 (${len !== 1 ? len : ""})`; summary += ` 📎${len !== 1 ? ` (${len})` : ""}`;
} }
// 投票が添付されているとき // 投票が添付されているとき