From a59b67ec45db4b7465b358fdabb3cdb4dbd067a8 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Sun, 26 Dec 2021 21:54:27 +0530 Subject: [PATCH] Fix errors --- src/matrix/registration/Registration.ts | 1 - src/matrix/registration/stages/BaseRegistrationStage.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) 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";