Skip to content

Commit ce0c93f

Browse files
FrancescoMolinaroatarix83
authored andcommitted
Merged in task/mani-cris/DSC-2128 (pull request DSpace#2659)
[DSC-2128] fix never completing observable Approved-by: Giuseppe Digilio
2 parents 447884c + 9d6f76e commit ce0c93f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ import {
2323
} from '@ngx-translate/core';
2424
import {
2525
BehaviorSubject,
26+
combineLatest,
2627
combineLatest as observableCombineLatest,
2728
Observable,
2829
of,
2930
Subscription,
31+
switchMap,
3032
} from 'rxjs';
3133
import {
3234
map,
33-
mergeMap,
3435
tap,
35-
withLatestFrom,
3636
} from 'rxjs/operators';
3737

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

0 commit comments

Comments
 (0)