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,
|
Subscription,
|
||||||
} from 'rxjs';
|
} from 'rxjs';
|
||||||
import {
|
import {
|
||||||
first,
|
|
||||||
map,
|
map,
|
||||||
switchMap,
|
switchMap,
|
||||||
|
take,
|
||||||
tap,
|
tap,
|
||||||
} from 'rxjs/operators';
|
} from 'rxjs/operators';
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ export class AbstractItemUpdateComponent extends AbstractTrackableComponent impl
|
|||||||
super.ngOnInit();
|
super.ngOnInit();
|
||||||
|
|
||||||
this.discardTimeOut = environment.item.edit.undoTimeout;
|
this.discardTimeOut = environment.item.edit.undoTimeout;
|
||||||
this.hasChanges().pipe(first()).subscribe((hasChanges) => {
|
this.hasChanges().pipe(take(1)).subscribe((hasChanges) => {
|
||||||
if (!hasChanges) {
|
if (!hasChanges) {
|
||||||
this.initializeOriginalFields();
|
this.initializeOriginalFields();
|
||||||
} else {
|
} else {
|
||||||
@@ -187,7 +187,7 @@ export class AbstractItemUpdateComponent extends AbstractTrackableComponent impl
|
|||||||
*/
|
*/
|
||||||
private checkLastModified() {
|
private checkLastModified() {
|
||||||
const currentVersion = this.item.lastModified;
|
const currentVersion = this.item.lastModified;
|
||||||
this.objectUpdatesService.getLastModified(this.url).pipe(first()).subscribe(
|
this.objectUpdatesService.getLastModified(this.url).pipe(take(1)).subscribe(
|
||||||
(updateVersion: Date) => {
|
(updateVersion: Date) => {
|
||||||
if (updateVersion.getDate() !== currentVersion.getDate()) {
|
if (updateVersion.getDate() !== currentVersion.getDate()) {
|
||||||
this.notificationsService.warning(this.getNotificationTitle('outdated'), this.getNotificationContent('outdated'));
|
this.notificationsService.warning(this.getNotificationTitle('outdated'), this.getNotificationContent('outdated'));
|
||||||
|
Reference in New Issue
Block a user