Skip to content

Commit

Permalink
print the erroneous date instead
Browse files Browse the repository at this point in the history
  • Loading branch information
awildturtok committed Jan 4, 2024
1 parent 355bab5 commit c9c8851
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/src/js/preview-v2/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export function formatNumber(num: number, precision = 2): string {
export function formatDate(date: string | undefined) {
if (date) {
return (
parseDate(date, "yyyy-MM-dd")?.toLocaleDateString("de-de") ??
t("preview.dateError")
parseDate(date, "yyyy-MM-dd")?.toLocaleDateString("de-de") ?? date
);
}
return t("preview.dateError");
Expand Down

0 comments on commit c9c8851

Please sign in to comment.