summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/misc/get-note-html.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/remote/activitypub/misc/get-note-html.ts')
-rw-r--r--src/remote/activitypub/misc/get-note-html.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/remote/activitypub/misc/get-note-html.ts b/src/remote/activitypub/misc/get-note-html.ts
index 6990a4ae5e..683860d9cc 100644
--- a/src/remote/activitypub/misc/get-note-html.ts
+++ b/src/remote/activitypub/misc/get-note-html.ts
@@ -1,9 +1,9 @@
+import * as mfm from 'mfm-js';
import { Note } from '../../../models/entities/note';
import { toHtml } from '../../../mfm/to-html';
-import { parse } from '../../../mfm/parse';
export default function(note: Note) {
- let html = toHtml(parse(note.text), JSON.parse(note.mentionedRemoteUsers));
+ let html = note.text ? toHtml(mfm.parse(note.text), JSON.parse(note.mentionedRemoteUsers)) : null;
if (html == null) html = '<p>.</p>';
return html;