Skip to content

Commit

Permalink
Merge pull request summernote#1817 from Megabyteceer/patch-1
Browse files Browse the repository at this point in the history
Firefox 'node is null' error fixing.
  • Loading branch information
hackerwins committed Apr 10, 2016
2 parents 358c847 + 10821a4 commit 93d6cbb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/js/base/core/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,13 @@ define([
if (isText(node)) {
return node.nodeValue.length;
}

return node.childNodes.length;

if (node) {
return node.childNodes.length;
}

return 0;

};

/**
Expand Down

0 comments on commit 93d6cbb

Please sign in to comment.