fix: page refresh issue on adding new action (#1634)

This commit is contained in:
Dhruwang Jariwala
2023-11-21 14:25:02 +05:30
committed by GitHub
parent 7331d1dd5a
commit 97cc6232c2
2 changed files with 2 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ export default function SurveyEditor({
useEffect(() => {
if (survey) {
if (localSurvey) return;
setLocalSurvey(JSON.parse(JSON.stringify(survey)));
if (survey.questions.length > 0) {

View File

@@ -97,6 +97,7 @@ export default function WhenToSendCard({
};
useEffect(() => {
if (isAddEventModalOpen) return;
if (activeIndex !== null) {
const newActionClass = actionClassArray[actionClassArray.length - 1].name;
const currentActionClass = localSurvey.triggers[activeIndex];