1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 06:43:35 +00: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;
}