From 5ea0f23389d6222e19925a02031b747fffff61bb 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 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 = '';