mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merge branch 'w2p-101127_browse-by-controlled-vocabulary' into w2p-101127_browse-by-controlled-vocabulary-7.6.0-next
Conflicts: src/app/browse-by/browse-by-routing.module.ts src/app/browse-by/browse-by.module.ts src/app/core/browse/browse-definition-data.service.ts src/app/core/core.module.ts
This commit is contained in:
@@ -7,6 +7,7 @@ import { PaginatedList } from '../data/paginated-list.model';
|
||||
import { RemoteData } from '../data/remote-data';
|
||||
import { RequestService } from '../data/request.service';
|
||||
import { BrowseDefinition } from '../shared/browse-definition.model';
|
||||
import { FlatBrowseDefinition } from '../shared/flat-browse-definition.model';
|
||||
import { BrowseEntry } from '../shared/browse-entry.model';
|
||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||
import { Item } from '../shared/item.model';
|
||||
@@ -240,7 +241,12 @@ export class BrowseService {
|
||||
getPaginatedListPayload(),
|
||||
map((browseDefinitions: BrowseDefinition[]) => browseDefinitions
|
||||
.find((def: BrowseDefinition) => {
|
||||
const matchingKeys = def.metadataKeys.find((key: string) => searchKeyArray.indexOf(key) >= 0);
|
||||
let matchingKeys = '';
|
||||
|
||||
if (Array.isArray((def as FlatBrowseDefinition).metadataKeys)) {
|
||||
matchingKeys = (def as FlatBrowseDefinition).metadataKeys.find((key: string) => searchKeyArray.indexOf(key) >= 0);
|
||||
}
|
||||
|
||||
return isNotEmpty(matchingKeys);
|
||||
})
|
||||
),
|
||||
|
Reference in New Issue
Block a user