From 9b353ba41d06e3a2013b6e7af21869980722db40 Mon Sep 17 00:00:00 2001 From: DD Liu Date: Wed, 24 Jul 2019 17:01:19 -0400 Subject: [PATCH] Use children instead of childNodes to not get text --- src/svg/SvgImport.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/svg/SvgImport.js b/src/svg/SvgImport.js index 09e3da44..6882f033 100644 --- a/src/svg/SvgImport.js +++ b/src/svg/SvgImport.js @@ -316,8 +316,8 @@ new function() { // Does not support x/y attribute or tspan positioning beyond left justified. var lines = []; var spacing = 1.2; - for (var i = 0; i < node.childNodes.length; i++) { - var child = node.childNodes[i]; + for (var i = 0; i < node.children.length; i++) { + var child = node.children[i]; lines.push(child.textContent); var dyString = child.getAttribute('dy'); if (dyString) {