check if possible parent exists before checking if it contains another element

pull/1/head
ansuz 9 years ago
parent 67bdb8a65a
commit 5425699f43

@ -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) {

Loading…
Cancel
Save