diff --git a/packages/slate-html-serializer/src/index.js b/packages/slate-html-serializer/src/index.js index f4be5b56b..80ae6d1ba 100644 --- a/packages/slate-html-serializer/src/index.js +++ b/packages/slate-html-serializer/src/index.js @@ -78,7 +78,8 @@ function defaultParseHtml(html) { const parsed = new DOMParser().parseFromString(html, 'text/html') const { body } = parsed - return body + // COMPAT: in IE 11 body is null if html is an empty string + return body || window.document.createElement('body') } /**