Text-slicer: Fix bug with nodes without a classname

This commit is contained in:
Jermolene
2016-02-01 21:22:55 +00:00
parent 3a10bfe0de
commit b8aa60cdab
7 changed files with 7 additions and 7 deletions

View File

@@ -19,7 +19,7 @@ exports.processTermNode = function(domNode,tagName) {
var title = this.makeUniqueTitle("term",text),
parentTitle = this.parentStack[this.parentStack.length - 1].title,
tags = [];
if(domNode.className.trim() !== "") {
if(domNode.className && domNode.className.trim() !== "") {
tags = tags.concat(domNode.className.split(" "));
}
this.addToList(parentTitle,title);