Skip to content

Commit 058060e

Browse files
Revert "[DSC-2140] avoid showing placeholder metadata values"
This reverts commit 2b6ef99.
1 parent a76823f commit 058060e

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/app/core/shared/metadata.utils.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import { validate as uuidValidate } from 'uuid';
1414

1515
export const AUTHORITY_GENERATE = 'will be generated::';
1616
export const AUTHORITY_REFERENCE = 'will be referenced::';
17-
export const PLACEHOLDER_VALUE = '#PLACEHOLDER_PARENT_METADATA_VALUE#';
18-
1917

2018
/**
2119
* Utility class for working with DSpace object metadata.
@@ -31,6 +29,7 @@ export const PLACEHOLDER_VALUE = '#PLACEHOLDER_PARENT_METADATA_VALUE#';
3129
* followed by any other (non-dc) metadata values.
3230
*/
3331
export class Metadata {
32+
3433
/**
3534
* Gets all matching metadata in the map(s).
3635
*
@@ -153,7 +152,7 @@ export class Metadata {
153152
* Returns true if this Metadatum's value is defined
154153
*/
155154
public static hasValue(value: MetadataValue|string): boolean {
156-
if (isEmpty(value) || value === PLACEHOLDER_VALUE) {
155+
if (isEmpty(value)) {
157156
return false;
158157
}
159158
if (isObject(value) && value.hasOwnProperty('value')) {
@@ -170,9 +169,7 @@ export class Metadata {
170169
* @returns {boolean} whether the filter matches, or true if no filter is given.
171170
*/
172171
public static valueMatches(mdValue: MetadataValue, filter: MetadataValueFilter) {
173-
if (mdValue.value === PLACEHOLDER_VALUE) {
174-
return false;
175-
} else if (!filter) {
172+
if (!filter) {
176173
return true;
177174
} else if (filter.language && filter.language !== mdValue.language) {
178175
return false;

0 commit comments

Comments
 (0)