check if possible parent exists before checking if it contains another element
This commit is contained in:
1 parent
67bdb8a65a
commit
5425699f43
1 file changed
+1
-1
@@ -96,7 +96,7 @@ define([], function () {
|
|||||||
|
|
||||||
// not being used internally, but is useful externally
|
// not being used internally, but is useful externally
|
||||||
tree.contains = function (el, root) {
|
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) {
|
var siblingCount = tree.siblingCount = function (el) {
|
||||||
|
|||||||
Reference in new issue
Block a user