mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[CST-4320] fixed item version component initialization
This commit is contained in:
@@ -16,7 +16,7 @@ import { VersionHistoryDataService } from '../../../core/data/version-history-da
|
|||||||
import { PaginatedSearchOptions } from '../../search/paginated-search-options.model';
|
import { PaginatedSearchOptions } from '../../search/paginated-search-options.model';
|
||||||
import { AlertType } from '../../alert/aletr-type';
|
import { AlertType } from '../../alert/aletr-type';
|
||||||
import { followLink } from '../../utils/follow-link-config.model';
|
import { followLink } from '../../utils/follow-link-config.model';
|
||||||
import { hasValueOperator } from '../../empty.util';
|
import { hasValue, hasValueOperator } from '../../empty.util';
|
||||||
import { PaginationService } from '../../../core/pagination/pagination.service';
|
import { PaginationService } from '../../../core/pagination/pagination.service';
|
||||||
import { getItemPageRoute } from '../../../+item-page/item-page-routing-paths';
|
import { getItemPageRoute } from '../../../+item-page/item-page-routing-paths';
|
||||||
|
|
||||||
@@ -110,6 +110,7 @@ export class ItemVersionsComponent implements OnInit {
|
|||||||
* Initialize all observables
|
* Initialize all observables
|
||||||
*/
|
*/
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
if (hasValue(this.item.version)) {
|
||||||
this.versionRD$ = this.item.version;
|
this.versionRD$ = this.item.version;
|
||||||
this.versionHistoryRD$ = this.versionRD$.pipe(
|
this.versionHistoryRD$ = this.versionRD$.pipe(
|
||||||
getAllSucceededRemoteData(),
|
getAllSucceededRemoteData(),
|
||||||
@@ -146,6 +147,7 @@ export class ItemVersionsComponent implements OnInit {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this.paginationService.clearPagination(this.options.id);
|
this.paginationService.clearPagination(this.options.id);
|
||||||
|
Reference in New Issue
Block a user