Use children instead of childNodes to not get text

This commit is contained in:
DD Liu 2019-07-24 17:01:19 -04:00
parent a4667ddd7e
commit 9b353ba41d

View file

@ -316,8 +316,8 @@ new function() {
// Does not support x/y attribute or tspan positioning beyond left justified. // Does not support x/y attribute or tspan positioning beyond left justified.
var lines = []; var lines = [];
var spacing = 1.2; var spacing = 1.2;
for (var i = 0; i < node.childNodes.length; i++) { for (var i = 0; i < node.children.length; i++) {
var child = node.childNodes[i]; var child = node.children[i];
lines.push(child.textContent); lines.push(child.textContent);
var dyString = child.getAttribute('dy'); var dyString = child.getAttribute('dy');
if (dyString) { if (dyString) {