mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-12 12:33:07 +00:00
120109: Fixed "no elements in sequence" sometimes being thrown on the item bitstream & relationship tabs
(cherry picked from commit decacec404
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
9c843b62d4
commit
c9ba47b9af
@@ -16,9 +16,9 @@ import {
|
||||
Subscription,
|
||||
} from 'rxjs';
|
||||
import {
|
||||
first,
|
||||
map,
|
||||
switchMap,
|
||||
take,
|
||||
tap,
|
||||
} from 'rxjs/operators';
|
||||
|
||||
@@ -102,7 +102,7 @@ export class AbstractItemUpdateComponent extends AbstractTrackableComponent impl
|
||||
super.ngOnInit();
|
||||
|
||||
this.discardTimeOut = environment.item.edit.undoTimeout;
|
||||
this.hasChanges().pipe(first()).subscribe((hasChanges) => {
|
||||
this.hasChanges().pipe(take(1)).subscribe((hasChanges) => {
|
||||
if (!hasChanges) {
|
||||
this.initializeOriginalFields();
|
||||
} else {
|
||||
@@ -187,7 +187,7 @@ export class AbstractItemUpdateComponent extends AbstractTrackableComponent impl
|
||||
*/
|
||||
private checkLastModified() {
|
||||
const currentVersion = this.item.lastModified;
|
||||
this.objectUpdatesService.getLastModified(this.url).pipe(first()).subscribe(
|
||||
this.objectUpdatesService.getLastModified(this.url).pipe(take(1)).subscribe(
|
||||
(updateVersion: Date) => {
|
||||
if (updateVersion.getDate() !== currentVersion.getDate()) {
|
||||
this.notificationsService.warning(this.getNotificationTitle('outdated'), this.getNotificationContent('outdated'));
|
||||
|
Reference in New Issue
Block a user