mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 10:34:15 +00:00
Merge remote-tracking branch 'remotes/origin/main' into upgrade_angular10
# Conflicts: # src/app/+item-page/item-page.module.ts # src/app/core/shared/item.model.ts # src/app/shared/object-grid/item-grid-element/item-types/item/item-grid-element.component.spec.ts # src/app/shared/search/search-filters/search-filter/search-authority-filter/search-authority-filter.component.ts # src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.ts # src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.ts # src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts # src/app/shared/shared.module.ts
This commit is contained in:
15
src/app/core/cache/object-cache.reducer.ts
vendored
15
src/app/core/cache/object-cache.reducer.ts
vendored
@@ -33,6 +33,21 @@ export abstract class TypedObject {
|
||||
type: ResourceType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the string value for an object that may be a string or a ResourceType
|
||||
*
|
||||
* @param type the object to get the type value for
|
||||
*/
|
||||
export const getResourceTypeValueFor = (type: any): string => {
|
||||
if (hasValue(type)) {
|
||||
if (typeof type === 'string') {
|
||||
return type;
|
||||
} else if (typeof type.value === 'string') {
|
||||
return type.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* tslint:disable:max-classes-per-file */
|
||||
/**
|
||||
* An interface to represent objects that can be cached
|
||||
|
Reference in New Issue
Block a user