1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 05:43:41 +00:00

Fix last seen & spacing issue (#3567)

* Fix last seen & spacing issue

* Address PR comments, moving try catch to config service
This commit is contained in:
Colton Hurst
2022-09-27 11:09:48 -04:00
committed by GitHub
parent 701d795000
commit d168d5ee9b
3 changed files with 13 additions and 11 deletions

View File

@@ -48,14 +48,16 @@ export class ConfigService implements ConfigServiceAbstraction {
}
private async fetchServerConfig(): Promise<ServerConfig> {
const response = await this.configApiService.get();
const data = new ServerConfigData(response);
try {
const response = await this.configApiService.get();
if (data != null) {
await this.stateService.setServerConfig(data);
return new ServerConfig(data);
if (response != null) {
const data = new ServerConfigData(response);
await this.stateService.setServerConfig(data);
return new ServerConfig(data);
}
} catch {
return null;
}
return null;
}
}