Fix two inconsistencies in dygraph-externs.js (#859)
[dygraphs.git] / src / dygraph-options.js
index c77e498..7c7f745 100644 (file)
@@ -167,8 +167,10 @@ DygraphOptions.prototype.reparseSeries = function() {
   utils.update(this.xAxis_.options, axis_opts["x"] || {});
 
   // For "production" code, this gets removed by uglifyjs.
-  if (process.env.NODE_ENV != 'production') {
-    this.validateOptions_();
+  if (typeof(process) !== 'undefined') {
+    if (process.env.NODE_ENV != 'production') {
+      this.validateOptions_();
+    }
   }
 };
 
@@ -326,6 +328,7 @@ DygraphOptions.prototype.seriesNames = function() {
 };
 
 // For "production" code, this gets removed by uglifyjs.
+if (typeof(process) !== 'undefined') {
 if (process.env.NODE_ENV != 'production') {
 
 /**
@@ -395,5 +398,6 @@ DygraphOptions.resetWarnings_ = function() {
 };
 
 }
+}
 
 export default DygraphOptions;