summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mfm/html-to-mfm.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mfm/html-to-mfm.ts b/src/mfm/html-to-mfm.ts
index 540635036a..daa228ec51 100644
--- a/src/mfm/html-to-mfm.ts
+++ b/src/mfm/html-to-mfm.ts
@@ -1,6 +1,8 @@
const parse5 = require('parse5');
export default function(html: string): string {
+ if (html == null) return null;
+
const dom = parse5.parseFragment(html);
let text = '';