From 7fb080a44de323319f0d3bcf4f1c26a5453777fa Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Sun, 4 Aug 2019 17:25:48 -0400 Subject: [PATCH] Avoid using .textContent --- src/to-vdom.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/to-vdom.js b/src/to-vdom.js index 4528c6f..2f0e4fb 100644 --- a/src/to-vdom.js +++ b/src/to-vdom.js @@ -11,7 +11,7 @@ export default function toVdom(node, visitor, h, options) { function walk(n, index, arr) { if (n.nodeType===3) { - let text = 'textContent' in n ? n.textContent : n.nodeValue || ''; + let text = n.data || ''; if (walk.options.trim!==false) { let isFirstOrLast = index===0 || index===arr.length-1; @@ -53,7 +53,7 @@ function getProps(attrs) { for (let i=0; i