Fix instance get config
authorChocobozzz <me@florianbigard.com>
Mon, 17 Feb 2020 10:56:28 +0000 (11:56 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 17 Feb 2020 10:56:28 +0000 (11:56 +0100)
client/src/app/core/server/server.service.ts

index cdcbcb528ec8931ffb677e3e6f9b2525b28aadd8..3997ce6db02b5bbb320a5f6d8ba8e0c67c58a659 100644 (file)
@@ -159,8 +159,11 @@ export class ServerService {
     if (!this.configObservable) {
       this.configObservable = this.http.get<ServerConfig>(ServerService.BASE_CONFIG_URL)
                                   .pipe(
-                                    tap(this.saveConfigLocally),
-                                    tap(() => this.configLoaded = true),
+                                    tap(config => this.saveConfigLocally(config)),
+                                    tap(config => {
+                                      this.config = config
+                                      this.configLoaded = true
+                                    }),
                                     tap(() => {
                                       if (this.configReset) {
                                         this.configReloaded.next()