diff --git a/src/matrix/registration/Registration.ts b/src/matrix/registration/Registration.ts index 9dcfdbe2..1432f41a 100644 --- a/src/matrix/registration/Registration.ts +++ b/src/matrix/registration/Registration.ts @@ -54,7 +54,6 @@ export class Registration { async start(): Promise { const response = await this._fetchFlows(); this.parseStagesFromResponse(response); - await new Promise(r => setTimeout(r, 2000)); return this._firstStage; } diff --git a/src/matrix/registration/stages/BaseRegistrationStage.ts b/src/matrix/registration/stages/BaseRegistrationStage.ts index 6c5ae256..51115974 100644 --- a/src/matrix/registration/stages/BaseRegistrationStage.ts +++ b/src/matrix/registration/stages/BaseRegistrationStage.ts @@ -55,7 +55,7 @@ export abstract class BaseRegistrationStage { // registration completed successfully return true; } - else if (response.completed?.forEach(c => c === this.type)) { + else if (response.completed?.find(c => c === this.type)) { return this._nextStage; } const error = response.error ?? "Could not parse response";