61947: Thumbnail display fix

This commit is contained in:
Kristof De Langhe
2019-04-23 14:32:11 +02:00
parent 5a06c9195e
commit 15ed0cc8fa

View File

@@ -8,6 +8,7 @@ import { Bitstream } from './bitstream.model';
import { hasValue, isNotEmpty } from '../../shared/empty.util';
import { PaginatedList } from '../data/paginated-list';
import { Relationship } from './item-relationships/relationship.model';
import { getSucceededRemoteData } from './operators';
export class Item extends DSpaceObject {
@@ -95,7 +96,7 @@ export class Item extends DSpaceObject {
*/
getBitstreamsByBundleName(bundleName: string): Observable<Bitstream[]> {
return this.bitstreams.pipe(
filter((rd: RemoteData<PaginatedList<Bitstream>>) => !rd.isResponsePending),
getSucceededRemoteData(),
map((rd: RemoteData<PaginatedList<Bitstream>>) => rd.payload.page),
filter((bitstreams: Bitstream[]) => hasValue(bitstreams)),
take(1),