Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENV] replace process.NODE_ENV with process.env.NODE_ENV #573

Merged
merged 1 commit into from
Apr 24, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/js/app-bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var AppBar = React.createClass({
},

componentDidMount: function() {
if (process.NODE_ENV !== 'production' &&
if (process.env.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.';
Expand Down
2 changes: 1 addition & 1 deletion src/js/drop-down-menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var DropDownMenu = React.createClass({
_setSelectedIndex: function(props) {
var selectedIndex = props.selectedIndex;

if (process.NODE_ENV !== 'production' && selectedIndex < 0) {
if (process.env.NODE_ENV !== 'production' && selectedIndex < 0) {
console.warn('Cannot set selectedIndex to a negative index.', selectedIndex);
}

Expand Down
2 changes: 1 addition & 1 deletion src/js/enhanced-switch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ var EnhancedSwitch = React.createClass({
if (!this.props.hasOwnProperty('checked') || this.props.checked === false) {
this.setState({switched: newSwitchedValue});
React.findDOMNode(this.refs.checkbox).checked = newSwitchedValue;
} else if (process.NODE_ENV !== 'production') {
} else if (process.env.NODE_ENV !== 'production') {
var message = 'Cannot call set method while checked is defined as a property.';
console.error(message);
}
Expand Down
2 changes: 1 addition & 1 deletion src/js/floating-action-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var RaisedButton = React.createClass({
},

componentDidMount: function() {
if (process.NODE_ENV !== 'production') {
if (process.env.NODE_ENV !== 'production') {
if (this.props.iconClassName && this.props.children) {
var warning = 'You have set both an iconClassName and a child icon. ' +
'It is recommended you use only one method when adding ' +
Expand Down
2 changes: 1 addition & 1 deletion src/js/icon-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var IconButton = React.createClass({
if (this.props.tooltip) {
this._positionTooltip();
}
if (process.NODE_ENV !== 'production') {
if (process.env.NODE_ENV !== 'production') {
if (this.props.iconClassName && this.props.children) {
var warning = 'You have set both an iconClassName and a child icon. ' +
'It is recommended you use only one method when adding ' +
Expand Down
2 changes: 1 addition & 1 deletion src/js/input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var Input = React.createClass({
},

componentDidMount: function() {
if (process.NODE_ENV !== 'production') {
if (process.env.NODE_ENV !== 'production') {
console.warn('Input has been deprecated. Please use TextField instead. See http://material-ui.com/#/components/text-fields');
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/js/radio-button-group.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ var RadioButtonGroup = React.createClass({
_updateRadioButtons: function(newSelection) {
if (this.state.numberCheckedRadioButtons == 0) {
this.setState({selected: newSelection});
} else if (process.NODE_ENV !== 'production') {
var message = "Cannot select a different radio button while another radio button " +
} else if (process.env.NODE_ENV !== 'production') {
var message = "Cannot select a different radio button while another radio button " +
"has the 'checked' property set to true.";
console.error(message);
}
Expand Down
4 changes: 2 additions & 2 deletions src/js/text-field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ var TextField = React.createClass({
},

setErrorText: function(newErrorText) {
if (process.NODE_ENV !== 'production' && this.props.hasOwnProperty('errorText')) {
if (process.env.NODE_ENV !== 'production' && this.props.hasOwnProperty('errorText')) {
console.error('Cannot call TextField.setErrorText when errorText is defined as a property.');
} else if (this.isMounted()) {
this.setState({errorText: newErrorText});
}
},

setValue: function(newValue) {
if (process.NODE_ENV !== 'production' && this._isControlled()) {
if (process.env.NODE_ENV !== 'production' && this._isControlled()) {
console.error('Cannot call TextField.setValue when value or valueLink is defined as a property.');
} else if (this.isMounted()) {
this._getInputNode().value = newValue;
Expand Down