Skip to content

Commit

Permalink
Add project configuration check in handleToggle.
Browse files Browse the repository at this point in the history
  • Loading branch information
jelliotartz committed Oct 25, 2017
1 parent f59b0ce commit 4977764
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/pages/admin/project-status.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ class ProjectStatus extends Component {
handleToggle(event, workflow) {
this.setState({ error: null });
const isChecked = event.target.checked;
const defaultWorkflowId = this.state.project.configuration.default_workflow;
let defaultWorkflowId;

if (this.state.project.configuration) {
defaultWorkflowId = this.state.project.configuration.default_workflow;
}

if (defaultWorkflowId === workflow.id && workflow.active) {
this.setState({
Expand Down

0 comments on commit 4977764

Please sign in to comment.