X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-utils.js;h=223360b319135d7745f60748d8fd7bb7d3b6643b;hb=2323945cebe74e7ca1f3897fcb5e7a5aed5fc80f;hp=250c85539ac15e8f61c2d2e783ad45a12370b3af;hpb=5605628cc2f2ca8d4f3b297a3d15dbded2c07f1e;p=dygraphs.git diff --git a/dygraph-utils.js b/dygraph-utils.js index 250c855..223360b 100644 --- a/dygraph-utils.js +++ b/dygraph-utils.js @@ -1244,10 +1244,11 @@ Dygraph.isNodeContainedBy = function(containee, container) { if (container === null || containee === null) { return false; } - while (containee && containee !== container) { - containee = containee.parentNode; + var containeeNode = /** @type {Node} */ (containee); + while (containeeNode && containeeNode !== container) { + containeeNode = containeeNode.parentNode; } - return (containee === container); + return (containeeNode === container); };