Skip to content

Commit

Permalink
fix(frontend): FormStepOptions throw error when answer
Browse files Browse the repository at this point in the history
  • Loading branch information
Brayan-724 committed Sep 15, 2024
1 parent 299ed79 commit b9f0b80
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
export let sendAnswer: () => void;
if (step.data.jumps) {
if (typeof (step?.data?.jumps) === "object") {
const idx = step.data.options.findIndex(option => option === answer);
const jumpQuestion = step.data.jumps[idx];
Expand All @@ -27,7 +27,7 @@
bind:group={answer}
value={option}
on:change={() => {
const jumpQuestion = step.data.jumps[idx] ?? 3;
const jumpQuestion = step.data?.jumps?.[idx];
if (jumpQuestion != null) {
customNext = jumpQuestion;
}
Expand Down

0 comments on commit b9f0b80

Please sign in to comment.