Skip to content

Commit 0c27dec

Browse files
committed
feat(ENG-9818): fix
1 parent 91de4a0 commit 0c27dec

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

src/app/features/collections/components/add-to-collection/add-to-collection.component.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,17 @@ export class AddToCollectionComponent implements CanDeactivateComponent {
234234
},
235235
});
236236
} else {
237-
this.customDialogService
238-
.open(AddToCollectionConfirmationDialogComponent, {
239-
header: 'collections.addToCollection.confirmationDialogHeader',
240-
width: '500px',
241-
data: { payload, project: this.selectedProject() },
242-
})
243-
.onClose.pipe(
244-
filter((res) => !!res),
245-
switchMap(() => this.saveCedarRecordIfNeeded()),
237+
this.saveCedarRecordIfNeeded()
238+
.pipe(
239+
switchMap(() =>
240+
this.customDialogService
241+
.open(AddToCollectionConfirmationDialogComponent, {
242+
header: 'collections.addToCollection.confirmationDialogHeader',
243+
width: '500px',
244+
data: { payload, project: this.selectedProject() },
245+
})
246+
.onClose.pipe(filter((res) => !!res))
247+
),
246248
takeUntilDestroyed(this.destroyRef)
247249
)
248250
.subscribe({

0 commit comments

Comments
 (0)