Skip to content

Commit

Permalink
Merge pull request summernote#1800 from JoniJnm/bebe/patch-5
Browse files Browse the repository at this point in the history
isRightEdgeOf(), returns 0 if ancestor is null
  • Loading branch information
hackerwins committed Apr 10, 2016
2 parents 65939ab + 0acaa55 commit 774c788
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/base/core/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,9 @@ define([
* @return {Boolean}
*/
var isRightEdgeOf = function (node, ancestor) {
if (!ancestor) {
return false;
}
while (node && node !== ancestor) {
if (position(node) !== nodeLength(node.parentNode) - 1) {
return false;
Expand Down Expand Up @@ -598,7 +601,7 @@ define([

/**
* returns whether point is visible (can set cursor) or not.
*
*
* @param {BoundaryPoint} point
* @return {Boolean}
*/
Expand Down

0 comments on commit 774c788

Please sign in to comment.