fix: Backwards compatibility for js/sync endpoint (#2516)

This commit is contained in:
Anshuman Pandey
2024-04-23 19:35:50 +05:30
committed by GitHub
parent 4ac60db896
commit 86c8da3494
@@ -101,7 +101,9 @@ export const getUpdatedState = async (environmentId: string, personId?: string):
surveys = await getSyncSurveys(environmentId, (person as TPerson).id);
} else {
surveys = await getSurveys(environmentId);
surveys = surveys.filter((survey) => survey.type === "web" && survey.status === "inProgress");
surveys = surveys.filter(
(survey) => (survey.type === "app" || survey.type === "website") && survey.status === "inProgress"
);
}
surveys = transformLegacySurveys(surveys);