Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
fix: Merging fix from Fix-Configurator-Cancel-Loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evandro Carenho committed Mar 27, 2017
1 parent f00379d commit 9bce3c4
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions components/SubmitInstance/SubmitInstance.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,14 @@ export class SubmitInstance extends Component {
}

componentWillReceiveProps(nextProps) {
if (this.props.saved !== nextProps.saved) {
if (nextProps.saved) {
if (nextProps.operation === 'CREATE' || nextProps.operation === 'UPDATE') {
hashHistory.push('/instance-created');
} else if (nextProps.operation === 'REMOVE') {
hashHistory.push('/');
}
} else {
if (nextProps.saved) {
if (nextProps.operation === 'CREATE' || nextProps.operation === 'UPDATE') {
hashHistory.push('/instance-created');
} else if (nextProps.operation === 'REMOVE') {
hashHistory.push('/');
}
} else {
hashHistory.push('/');
}
}

Expand Down

0 comments on commit 9bce3c4

Please sign in to comment.