mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 00:43:49 +01:00
fix: render empty note content correctly
Instead of coercing to `null`, coercing to an empty string should simplify handling.
This commit is contained in:
parent
efe35ea9e0
commit
ebd33b9281
@ -82,15 +82,14 @@ export default async function renderNote(note: Note, dive = true, isTalk = false
|
||||
|
||||
const files = await getPromisedFiles(note.fileIds);
|
||||
|
||||
// text should never be undefined
|
||||
const text = note.text ?? null;
|
||||
const text = note.text ?? '';
|
||||
let poll: Poll | null = null;
|
||||
|
||||
if (note.hasPoll) {
|
||||
poll = await Polls.findOneBy({ noteId: note.id });
|
||||
}
|
||||
|
||||
let apText = text ?? '';
|
||||
let apText = text;
|
||||
|
||||
if (quote) {
|
||||
apText += `\n\nRE: ${quote}`;
|
||||
|
Loading…
Reference in New Issue
Block a user