From 438bb74bc92c7a34161a9e9c07e7b2b997081e38 Mon Sep 17 00:00:00 2001 From: anishreddy202 Date: Fri, 27 Apr 2018 09:36:04 -0500 Subject: [PATCH 1/2] Update index.js extra check, adding this code not to fail at parseFragment if value is null --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 5687727..79fc54b 100644 --- a/index.js +++ b/index.js @@ -34,6 +34,9 @@ function renderNode(node, key) { } function renderHTML(html) { + if (html === null) { + html = ''; // extra check, adding this code not to fail at parseFragment if value is null + } var htmlAST = htmlParser.parseFragment(html); if (htmlAST.childNodes.length === 0) { From 802a66ee360ea814bc1e3e6142b1026fecb4e6d2 Mon Sep 17 00:00:00 2001 From: anishreddy202 Date: Fri, 27 Apr 2018 11:10:03 -0500 Subject: [PATCH 2/2] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 79fc54b..3f51310 100644 --- a/index.js +++ b/index.js @@ -35,7 +35,7 @@ function renderNode(node, key) { function renderHTML(html) { if (html === null) { - html = ''; // extra check, adding this code not to fail at parseFragment if value is null + html = ''; } var htmlAST = htmlParser.parseFragment(html);