Bug 38201: Prevent 'Invalid Date' from displaying

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Matt Blenkinsop 2025-05-22 12:07:15 +01:00 committed by Lucas Gass
parent 35bc45139a
commit d22cb75eab
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 5 additions and 1 deletions

View File

@ -178,10 +178,14 @@ export default {
if (valueKey?.includes(".")) {
return this.accessNestedProperty(valueKey, resource);
}
return attr.format(
const displayValue = attr.format(
resource[valueKey] ? resource[valueKey] : valueKey,
resource
);
if (displayValue == "Invalid Date") {
return "";
}
return displayValue || "";
},
},
name: "ShowElement",