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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user