Skip to content

Commit

Permalink
Removed appbarwarning for production builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mmrtnz committed Feb 27, 2015
1 parent 7253a4c commit d30b10a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/js/app-bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ var AppBar = React.createClass({
iconElementRight: React.PropTypes.element,
title : React.PropTypes.node,
zDepth: React.PropTypes.number,

},

getDefaultProps: function() {
Expand All @@ -28,9 +27,12 @@ var AppBar = React.createClass({
},

componentDidMount: function() {
var warning = 'Properties iconClassNameLeft and iconElementLeft cannot be simultaneously ' +
'defined. Please use one or the other.';
if (this.props.iconElementLeft && this.props.iconClassNameLeft) console.warn(warning);
if (process.NODE_ENV !== 'production' &&
(this.props.iconElementLeft && this.props.iconClassNameLeft)) {
var warning = 'Properties iconClassNameLeft and iconElementLeft cannot be simultaneously ' +
'defined. Please use one or the other.';
console.warn(warning);
}
},

render: function() {
Expand Down

0 comments on commit d30b10a

Please sign in to comment.