- // if (DEBUG) {
- // if (typeof(Dygraph.OPTIONS_REFERENCE) === 'undefined') {
- // console.error('Must include options reference JS for testing');
- // } else if (!Dygraph.OPTIONS_REFERENCE.hasOwnProperty(name)) {
- // console.error('Dygraphs is using property ' + name + ', which has no ' +
- // 'entry in the Dygraphs.OPTIONS_REFERENCE listing.');
- // // Only log this error once.
- // Dygraph.OPTIONS_REFERENCE[name] = true;
- // }
- // }
+ // For "production" code, this gets removed by uglifyjs.
+ if (process.env.NODE_ENV != 'production') {
+ if (typeof(OPTIONS_REFERENCE) === 'undefined') {
+ console.error('Must include options reference JS for testing');
+ } else if (!OPTIONS_REFERENCE.hasOwnProperty(name)) {
+ console.error('Dygraphs is using property ' + name + ', which has no ' +
+ 'entry in the Dygraphs.OPTIONS_REFERENCE listing.');
+ // Only log this error once.
+ OPTIONS_REFERENCE[name] = true;
+ }
+ }