Skip to content

Commit

Permalink
[DSC-2128] fix never completing observable
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoMolinaro committed Dec 31, 2024
1 parent 447884c commit 9d6f76e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ import {
} from '@ngx-translate/core';
import {
BehaviorSubject,
combineLatest,
combineLatest as observableCombineLatest,
Observable,
of,
Subscription,
switchMap,
} from 'rxjs';
import {
map,
mergeMap,
tap,
withLatestFrom,
} from 'rxjs/operators';

import {
Expand Down Expand Up @@ -197,7 +197,7 @@ export class DsoEditMetadataComponent implements OnInit, OnDestroy {
this.dsoUpdateSubscription = observableCombineLatest([this.route.data, this.route.parent.data]).pipe(
map(([data, parentData]: [Data, Data]) => Object.assign({}, data, parentData)),
tap((data: any) => this.initDSO(data.dso.payload)),
mergeMap(() => this.retrieveDataService().pipe(withLatestFrom(this.getSecuritySettings()))),
switchMap(() => combineLatest([this.retrieveDataService(),this.getSecuritySettings()])),
).subscribe(([dataService, securitySettings]: [UpdateDataService<DSpaceObject>, MetadataSecurityConfiguration]) => {
this.securitySettings$.next(securitySettings);
this.initDataService(dataService);
Expand Down

0 comments on commit 9d6f76e

Please sign in to comment.