Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
hyojin committed Jun 23, 2015
1 parent 90f9eeb commit 3815d3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nodeparser.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ NodeParser.prototype.getPseudoElement = function(container, type) {

NodeParser.prototype.getChildren = function(parentContainer) {
return flatten([].filter.call(parentContainer.node.childNodes, renderableNode).map(function(node) {
var container = [node.nodeType === Node.TEXT_NODE ? new TextContainer(node, parentContainer) : new NodeContainer(node, parentContainer)].filter(nonIgnoredElement);
var container = [node.nodeType === Node.TEXT_NODE && node.parentElement.tagName !== "text" ? new TextContainer(node, parentContainer) : new NodeContainer(node, parentContainer)].filter(nonIgnoredElement);
return node.nodeType === Node.ELEMENT_NODE && container.length && node.tagName !== "TEXTAREA" ? (container[0].isElementVisible() ? container.concat(this.getChildren(container[0])) : []) : container;
}, this));
};
Expand Down

0 comments on commit 3815d3f

Please sign in to comment.