From e340396ce15c314676ee09381643e3162515ffeb Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 6 Dec 2017 22:35:21 -0500 Subject: [PATCH] logout callback is always available --- src/services/api.service.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/services/api.service.ts b/src/services/api.service.ts index 32305c3757..3f66b51c4b 100644 --- a/src/services/api.service.ts +++ b/src/services/api.service.ts @@ -374,11 +374,7 @@ export default class ApiService { private async handleError(response: Response, tokenError: boolean): Promise { if ((tokenError && response.status === 400) || response.status === 401 || response.status === 403) { - if (this.logoutCallback) { - this.logoutCallback(true); - } else { - chrome.runtime.sendMessage({ command: 'logout', expired: true }); - } + this.logoutCallback(true); return null; }