Skip to content

Commit

Permalink
chore: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
9sneha-n committed Nov 10, 2024
1 parent 9159682 commit c68fb01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/domain/entities/Questionnaire/QuestionnaireQuestion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ export class QuestionnaireQuestion {
const updatedErrors = this.getQuestionWarningsAndErrors(question, rules);

if (question.isVisible !== updatedIsVisible) {
//If a question is hidden, reset its value
return {
...question,
isVisible: updatedIsVisible,
Expand Down
3 changes: 1 addition & 2 deletions src/domain/entities/Questionnaire/QuestionnaireSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ export class QuestionnaireSectionM {
: section;

if (section.isVisible === false && updatedSection.isVisible === true) {
//reset all questions in the section

//reset all questions in the section that was hidden
const resetQuestions = section.questions.reduce((acc, hiddenQuestion) => {
return QuestionnaireQuestion.updateQuestions(
section.questions,
Expand Down

0 comments on commit c68fb01

Please sign in to comment.