From 3e57414f9a1fa3a6fd1b57160a4c44ad49d0cdc8 Mon Sep 17 00:00:00 2001 From: aldendaniels Date: Mon, 20 Apr 2015 12:36:27 -0500 Subject: [PATCH] Fix broken tests when module is not defined --- src/dygraph.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.7.4