PR Comment: Adding check for undefined and changing back file modes
[dygraphs.git] / src / dygraph.js
index a5e326d..ee39383 100644 (file)
@@ -1815,7 +1815,7 @@ Dygraph.prototype.updateSelection_ = function(opt_animFraction) {
     ctx.save();
     for (i = 0; i < this.selPoints_.length; i++) {
       var pt = this.selPoints_[i];
-      if (isNaN(pt.canvasy) || pt.canvasy === null) continue;
+      if (isNaN(pt.canvasy) || pt.canvasy === null || pt.canvasy === undefined) continue;
 
       var circleSize = this.getNumericOption('highlightCircleSize', pt.name);
       var callback = this.getFunctionOption("drawHighlightPointCallback", pt.name);