From e13040a49e11cc185c62a808853e93162683b199 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Thu, 3 Feb 2022 12:04:13 +0530 Subject: [PATCH] Don't mutate flows --- src/matrix/registration/Registration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/registration/Registration.ts b/src/matrix/registration/Registration.ts index 1d44c50d..227d78bc 100644 --- a/src/matrix/registration/Registration.ts +++ b/src/matrix/registration/Registration.ts @@ -29,7 +29,7 @@ export class Registration { constructor(hsApi: HomeServerApi, accountDetails: AccountDetails, flowSelector?: FlowSelector) { this._hsApi = hsApi; this._accountDetails = accountDetails; - this._flowSelector = flowSelector ?? (flows => flows.pop()); + this._flowSelector = flowSelector ?? (flows => flows[0]); } async start(): Promise {