Skip to content

Commit

Permalink
fix for repeating label and answer piping when list deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
martyncolmer committed Jan 29, 2024
1 parent a53cc76 commit c6b03e0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions eq-author-api/src/businessLogic/onAnswerDeleted.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ const removeAnswerFromPiping = (ctx, deletedAnswer, pages) => {
deletedAnswer.id,
"Deleted answer"
);

page.answers?.forEach((answer) => {
answer.label = updatePipingValue(
answer.label,
deletedAnswer.id,
"Deleted answer"
);
});
});

const sections = getSections(ctx);
Expand Down

0 comments on commit c6b03e0

Please sign in to comment.