Skip to content

Commit

Permalink
Update Question.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
blcham committed Apr 22, 2021
1 parent 2150063 commit ee48e69
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/Question.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,9 @@ export default class Question extends React.Component {
const question = this.props.question;

if (FormUtils.isSection(question) && FormUtils.isAnswerable(question)) {
// answerable section

const answerValue = this._getFirstAnswerValue();
if (this.state.expanded && !answerValue) {
// section is expanded but answer is not positive
// close section
// console.warn('expanded state does not match answerable section value');
// close expanded answerable section that does not have positive answer
this.setState({ expanded: false });
}

Expand Down

0 comments on commit ee48e69

Please sign in to comment.