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:
parent
35bc45139a
commit
d22cb75eab
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue