fix: trigger (#3125)

This commit is contained in:
Anshuman Pandey
2024-09-11 10:01:37 +05:30
committed by GitHub
parent f55cad0121
commit 07b5dfe28a

View File

@@ -224,6 +224,12 @@ export const SurveyMenuBar = ({
}
});
if (localSurvey.type !== "link" && !localSurvey.triggers?.length) {
toast.error("Please set a survey trigger");
setIsSurveySaving(false);
return false;
}
const segment = await handleSegmentUpdate();
const updatedSurveyResponse = await updateSurveyAction({ ...localSurvey, segment });