diff --git a/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/LogicEditor.tsx b/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/LogicEditor.tsx
index 47949ae64e..97365481be 100644
--- a/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/LogicEditor.tsx
+++ b/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/LogicEditor.tsx
@@ -82,6 +82,7 @@ export default function LogicEditor({
cta: ["clicked", "skipped"],
consent: ["skipped", "accepted"],
};
+
const logicConditions: LogicConditions = {
submitted: {
label: "is submitted",
@@ -201,10 +202,9 @@ export default function LogicEditor({
};
const deleteLogic = (logicIdx: number) => {
- const newLogic = !question.logic
- ? []
- : (question.logic as Logic[]).filter((_: any, idx: number) => idx !== logicIdx);
- updateQuestion(questionIdx, { logic: newLogic });
+ const updatedLogic = !question.logic ? [] : JSON.parse(JSON.stringify(question.logic));
+ updatedLogic.splice(logicIdx, 1);
+ updateQuestion(questionIdx, { logic: updatedLogic });
};
const truncate = (str: string, n: number) =>
@@ -225,9 +225,7 @@ export default function LogicEditor({
If this answer
-