From: aldendaniels Date: Mon, 20 Apr 2015 17:36:27 +0000 (-0500) Subject: Fix broken tests when module is not defined X-Git-Tag: v2.0.0~60^2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=3e57414f9a1fa3a6fd1b57160a4c44ad49d0cdc8;p=dygraphs.git Fix broken tests when module is not defined --- diff --git a/src/dygraph.js b/src/dygraph.js index 1e4d2dd..878a747 100644 --- a/src/dygraph.js +++ b/src/dygraph.js @@ -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; }