mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-18 12:59:25 -06:00
fix: data migration type error
This commit is contained in:
@@ -49,6 +49,7 @@ async function runMigration(): Promise<void> {
|
||||
const updatedSurvey: UpdatedSurvey = structuredClone(survey) as UpdatedSurvey;
|
||||
|
||||
if (survey.redirectUrl) {
|
||||
// @ts-expect-error -- TS is not able to infer the type of updatedSurvey
|
||||
updatedSurvey.endings = [
|
||||
{
|
||||
type: "redirectToUrl",
|
||||
@@ -58,6 +59,7 @@ async function runMigration(): Promise<void> {
|
||||
},
|
||||
];
|
||||
} else if (survey.thankYouCard?.enabled) {
|
||||
// @ts-expect-error -- TS is not able to infer the type of updatedSurvey
|
||||
updatedSurvey.endings = [
|
||||
{
|
||||
...survey.thankYouCard,
|
||||
@@ -66,6 +68,7 @@ async function runMigration(): Promise<void> {
|
||||
},
|
||||
];
|
||||
} else {
|
||||
// @ts-expect-error -- TS is not able to infer the type of updatedSurvey
|
||||
updatedSurvey.endings = [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user