File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/app/item-page/edit-item-page/abstract-item-update Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ import {
1616 Subscription ,
1717} from 'rxjs' ;
1818import {
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' ) ) ;
You can’t perform that action at this time.
0 commit comments