X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/f9dafeec8d45f0cb19d71326b7fa877891a7eb9e..03c11b879ff72814f50b0d790b0aacea12c687d3:/src/common/formatters.ts diff --git a/src/common/formatters.ts b/src/common/formatters.ts index 5383c66e..60e6cd59 100644 --- a/src/common/formatters.ts +++ b/src/common/formatters.ts @@ -4,13 +4,13 @@ import { PropertyValue } from "~/models/search-bar"; -export const formatDate = (isoDate?: string) => { +export const formatDate = (isoDate?: string | null) => { if (isoDate) { const date = new Date(isoDate); const text = date.toLocaleString(); - return text === 'Invalid Date' ? "" : text; + return text === 'Invalid Date' ? "(none)" : text; } - return ""; + return "(none)"; }; export const formatFileSize = (size?: number) => {