diff --git a/models/task/src/migration.ts b/models/task/src/migration.ts index d8ed47a8a6..dabb8fdf9e 100644 --- a/models/task/src/migration.ts +++ b/models/task/src/migration.ts @@ -306,7 +306,7 @@ async function migrateStatuses (client: MigrationClient): Promise { } if (task.doneState != null) { const newDoneStatus = oldStatusesMap.get(task.doneState) - if (newStatus !== undefined) { + if (newDoneStatus !== undefined) { update.doneState = newDoneStatus } } @@ -325,7 +325,7 @@ async function migrateStatuses (client: MigrationClient): Promise { } if (createTx.attributes.doneState != null) { const newDoneStatus = oldStatusesMap.get(createTx.attributes.doneState) - if (newStatus !== undefined) { + if (newDoneStatus !== undefined) { update['tx.attributes.doneState'] = newDoneStatus } } @@ -339,7 +339,7 @@ async function migrateStatuses (client: MigrationClient): Promise { } if (updateTx.operations.doneState != null) { const newDoneStatus = oldStatusesMap.get(updateTx.operations.doneState) - if (newStatus !== undefined) { + if (newDoneStatus !== undefined) { update['tx.operations.doneState'] = newDoneStatus } }