diff --git a/src/frontend/app/ui/settings/settings.service.ts b/src/frontend/app/ui/settings/settings.service.ts index 6d6dca29..c32c2e20 100644 --- a/src/frontend/app/ui/settings/settings.service.ts +++ b/src/frontend/app/ui/settings/settings.service.ts @@ -9,6 +9,7 @@ import {IPrivateConfig, ServerConfig} from '../../../../common/config/private/IP @Injectable() export class SettingsService { public settings: BehaviorSubject; + private fetchingSettings = false; constructor(private _networkService: NetworkService) { this.settings = new BehaviorSubject({ @@ -127,7 +128,16 @@ export class SettingsService { } public async getSettings(): Promise { - this.settings.next(await this._networkService.getJson>('/settings')); + if (this.fetchingSettings === true) { + return; + } + this.fetchingSettings = true; + try { + this.settings.next(await this._networkService.getJson>('/settings')); + } catch (e) { + console.error(e); + } + this.fetchingSettings = false; }