Skip to content

Commit

Permalink
Return Observable if already stored
Browse files Browse the repository at this point in the history
  • Loading branch information
Yamaguchi committed Apr 24, 2024
1 parent 0697c43 commit b83c363
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/app/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ export class ConfigService {
}

getConfig(): Observable<Config> {
if (this.config && this.observable) {
if (this.observable) {
return this.observable;
}

if (this.config) {
return new Observable(observer => {
observer.next(this.config);
observer.complete();
Expand Down

0 comments on commit b83c363

Please sign in to comment.