Skip to content

Commit c9ba47b

Browse files
120109: Fixed "no elements in sequence" sometimes being thrown on the item bitstream & relationship tabs
(cherry picked from commit decacec)
1 parent 9c843b6 commit c9ba47b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/item-page/edit-item-page/abstract-item-update/abstract-item-update.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import {
1616
Subscription,
1717
} from 'rxjs';
1818
import {
19-
first,
2019
map,
2120
switchMap,
21+
take,
2222
tap,
2323
} from 'rxjs/operators';
2424

@@ -102,7 +102,7 @@ export class AbstractItemUpdateComponent extends AbstractTrackableComponent impl
102102
super.ngOnInit();
103103

104104
this.discardTimeOut = environment.item.edit.undoTimeout;
105-
this.hasChanges().pipe(first()).subscribe((hasChanges) => {
105+
this.hasChanges().pipe(take(1)).subscribe((hasChanges) => {
106106
if (!hasChanges) {
107107
this.initializeOriginalFields();
108108
} else {
@@ -187,7 +187,7 @@ export class AbstractItemUpdateComponent extends AbstractTrackableComponent impl
187187
*/
188188
private checkLastModified() {
189189
const currentVersion = this.item.lastModified;
190-
this.objectUpdatesService.getLastModified(this.url).pipe(first()).subscribe(
190+
this.objectUpdatesService.getLastModified(this.url).pipe(take(1)).subscribe(
191191
(updateVersion: Date) => {
192192
if (updateVersion.getDate() !== currentVersion.getDate()) {
193193
this.notificationsService.warning(this.getNotificationTitle('outdated'), this.getNotificationContent('outdated'));

0 commit comments

Comments
 (0)