From fa7f0570fbd11b67ab4799d8f6195dba19adcd16 Mon Sep 17 00:00:00 2001 From: Karolis Narkevicius Date: Sat, 4 May 2019 02:07:11 +0100 Subject: [PATCH] fix: Guard against null in client side logout function (#1319) --- packages/authentication-client/src/core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/authentication-client/src/core.ts b/packages/authentication-client/src/core.ts index 0ebe9fd6c6..c79e68779b 100644 --- a/packages/authentication-client/src/core.ts +++ b/packages/authentication-client/src/core.ts @@ -163,7 +163,7 @@ export class AuthenticationClient { } logout () { - return this.app.get('authentication') + return Promise.resolve(this.app.get('authentication')) .then(() => this.service.remove(null)) .then((authResult: AuthenticationResult) => this.removeAccessToken() .then(() => this.reset())