1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-24 16:49:26 +01:00

logout callback is always available

This commit is contained in:
Kyle Spearrin 2017-12-06 22:35:21 -05:00
parent 81c01de641
commit e340396ce1

View File

@ -374,11 +374,7 @@ export default class ApiService {
private async handleError(response: Response, tokenError: boolean): Promise<ErrorResponse> {
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;
}