From ab320c4ba99da4cbcb43bcc06080e420cc5b6188 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 7 Jul 2018 12:50:09 +0900 Subject: [PATCH] Fix #1857 --- src/mfm/html-to-mfm.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mfm/html-to-mfm.ts b/src/mfm/html-to-mfm.ts index 540635036..daa228ec5 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 = '';