Remove moot `version` property from bower.json
[dygraphs.git] / src / dygraph.js
index 1e4d2dd..4f3ce77 100644 (file)
@@ -2671,7 +2671,7 @@ Dygraph.prototype.renderGraph_ = function(is_initial_draw) {
   this.canvas_.getContext('2d').clearRect(0, 0, this.width_, this.height_);
 
   if (this.getFunctionOption("drawCallback") !== null) {
-    this.getFunctionOption("drawCallback")(this, is_initial_draw);
+    this.getFunctionOption("drawCallback").call(this, this, is_initial_draw);
   }
   if (is_initial_draw) {
     this.readyFired_ = true;
@@ -3747,7 +3747,7 @@ Dygraph.addAnnotationRule = function() {
   console.warn("Unable to add default annotation CSS rule; display may be off.");
 };
 
-if (module && module.exports) {
+if (typeof exports === "object" && typeof module !== "undefined") {
   module.exports = Dygraph;
 }