mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 05:40:02 -06:00
fix: data migration for incomplete logic
This commit is contained in:
@@ -155,7 +155,7 @@ function convertLogicCondition(
|
||||
id: question.id,
|
||||
},
|
||||
operator,
|
||||
rightOperand: rightOperandValue,
|
||||
...(doesRightOperandExistResult ? { rightOperand: rightOperandValue } : {}),
|
||||
};
|
||||
|
||||
return newCondition;
|
||||
@@ -192,6 +192,10 @@ function convertLogic(
|
||||
oldLogic: TOldLogic,
|
||||
question: TSurveyQuestion
|
||||
): TSurveyAdvancedLogic | undefined {
|
||||
if (!oldLogic.condition || !oldLogic.destination) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const condition = convertLogicCondition(surveyId, oldLogic.condition, oldLogic.value, question);
|
||||
|
||||
if (!condition) {
|
||||
|
||||
Reference in New Issue
Block a user