fix: null check

This commit is contained in:
Namekuji 2023-09-18 21:16:51 -04:00
parent f67261d1e3
commit e300633011
No known key found for this signature in database
GPG key ID: 1D62332C07FBA532

View file

@ -31,10 +31,10 @@ function checkWordMute(
scyllaNote.renoteCw ?? ""
} ${scyllaNote.renoteText ?? ""}`;
if (scyllaNote.replyFiles.length > 0) {
if (scyllaNote.replyFiles && scyllaNote.replyFiles.length > 0) {
text += ` ${scyllaNote.replyFiles.map((f) => f.comment ?? "").join(" ")}`;
}
if (scyllaNote.renoteFiles.length > 0) {
if (scyllaNote.renoteFiles && scyllaNote.renoteFiles.length > 0) {
text += ` ${scyllaNote.renoteFiles
.map((f) => f.comment ?? "")
.join(" ")}`;