Browse Source

only log stuff to the console if NODE_ENV=debug

fixes #275
master
tmont 9 years ago
parent
commit
2e00b11f5c
  1. 2
      lib/table.js

2
lib/table.js

@ -98,7 +98,7 @@ Table.prototype.addColumn = function(col, options) {
} else { } else {
return this; return this;
} }
} else if(!!this[col.name] && (process.env.NODE_ENV !== 'test')) { } else if(!!this[col.name] && (process.env.NODE_ENV === 'debug')) {
console.log('Please notice that you have just defined the column "' + col.name + '". In order to access it, you need to use "table.getColumn(\'' + col.name + '\');"!'); console.log('Please notice that you have just defined the column "' + col.name + '". In order to access it, you need to use "table.getColumn(\'' + col.name + '\');"!');
} }
this.columns.push(col); this.columns.push(col);

Loading…
Cancel
Save