diff options
-rw-r--r-- | client/src/app/core/server/server.service.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index 6d886d2dd..7823fa80e 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { map, share, switchMap, tap } from 'rxjs/operators' | 1 | import { map, shareReplay, switchMap, tap } from 'rxjs/operators' |
2 | import { HttpClient } from '@angular/common/http' | 2 | import { HttpClient } from '@angular/common/http' |
3 | import { Inject, Injectable, LOCALE_ID } from '@angular/core' | 3 | import { Inject, Injectable, LOCALE_ID } from '@angular/core' |
4 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' | 4 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' |
@@ -178,13 +178,13 @@ export class ServerService { | |||
178 | 178 | ||
179 | // Default locale, nothing to translate | 179 | // Default locale, nothing to translate |
180 | if (isDefaultLocale(completeLocale)) { | 180 | if (isDefaultLocale(completeLocale)) { |
181 | this.localeObservable = of({}).pipe(share()) | 181 | this.localeObservable = of({}).pipe(shareReplay()) |
182 | return | 182 | return |
183 | } | 183 | } |
184 | 184 | ||
185 | this.localeObservable = this.http | 185 | this.localeObservable = this.http |
186 | .get(ServerService.BASE_LOCALE_URL + completeLocale + '/server.json') | 186 | .get(ServerService.BASE_LOCALE_URL + completeLocale + '/server.json') |
187 | .pipe(share()) | 187 | .pipe(shareReplay()) |
188 | } | 188 | } |
189 | 189 | ||
190 | private saveConfigLocally (config: ServerConfig) { | 190 | private saveConfigLocally (config: ServerConfig) { |