diff --git a/lib/backup/use-user-data-restore.js b/lib/backup/use-user-data-restore.js --- a/lib/backup/use-user-data-restore.js +++ b/lib/backup/use-user-data-restore.js @@ -106,7 +106,10 @@ restoreBackupState.payload.step, ); startStepIndex = completedStepIndex + 1; - } else if (restoreBackupState.status === 'user_data_restore_started') { + } else if ( + restoreBackupState.status === 'user_data_restore_started' || + restoreBackupState.status === 'user_data_restore_failed' + ) { startStepIndex = stepOrder.indexOf(restoreBackupState.payload.step); } else { // for any other state, start from scratch diff --git a/lib/reducers/backup-reducer.js b/lib/reducers/backup-reducer.js --- a/lib/reducers/backup-reducer.js +++ b/lib/reducers/backup-reducer.js @@ -157,7 +157,10 @@ currentStepIndex === lastCompletedStepIndex + 1, `Invalid step order: trying to start '${step}' but last completed step was '${store.payload.step}'`, ); - } else if (store.status === 'user_data_restore_started') { + } else if ( + store.status === 'user_data_restore_started' || + store.status === 'user_data_restore_failed' + ) { invariant( currentStepIndex === stepOrder.indexOf(store.payload.step), `Invalid step: trying to restart '${step}' but current step is '${store.payload.step}'`,