check if possible parent exists before checking if it contains another element
This commit is contained in:
@@ -96,7 +96,7 @@ define([], function () {
|
||||
|
||||
// not being used internally, but is useful externally
|
||||
tree.contains = function (el, root) {
|
||||
return el && root.contains && root.contains(el);
|
||||
return el && root && root.contains && root.contains(el);
|
||||
};
|
||||
|
||||
var siblingCount = tree.siblingCount = function (el) {
|
||||
|
||||
Reference in New Issue
Block a user