diff --git a/src/matrix/registration/Registration.ts b/src/matrix/registration/Registration.ts index 3d8ec9fc..a0b4eb89 100644 --- a/src/matrix/registration/Registration.ts +++ b/src/matrix/registration/Registration.ts @@ -73,7 +73,7 @@ export class Registration { throw new Error("flowSelector did not return any flow!"); } let firstStage: BaseRegistrationStage | undefined; - let lastStage: BaseRegistrationStage; + let lastStage: BaseRegistrationStage | undefined; for (const stage of flow.stages) { const registrationStage = this._createRegistrationStage(stage, session, params); if (!firstStage) {