From e97298bdc6e39c6c399a6226d5fe806bd300ee47 Mon Sep 17 00:00:00 2001 From: zacaj Date: Mon, 10 Nov 2025 16:58:32 +0000 Subject: [PATCH] fix(ui): ignore empty dates in rating/love tooltips - #4653 --- ui/src/common/LoveButton.jsx | 2 +- ui/src/common/RatingField.jsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/src/common/LoveButton.jsx b/ui/src/common/LoveButton.jsx index f941a7402..e1196439a 100644 --- a/ui/src/common/LoveButton.jsx +++ b/ui/src/common/LoveButton.jsx @@ -49,7 +49,7 @@ export const LoveButton = ({ disabled={disabled || loading || record.missing} className={classes.love} title={ - record.starredAt + record.starredAt && record.starredAt !== '0001-01-01T00:00:00Z' ? new Date(record.starredAt).toLocaleString() : undefined } diff --git a/ui/src/common/RatingField.jsx b/ui/src/common/RatingField.jsx index 947f236af..fd21f21e0 100644 --- a/ui/src/common/RatingField.jsx +++ b/ui/src/common/RatingField.jsx @@ -48,7 +48,9 @@ export const RatingField = ({ stopPropagation(e)} title={ - record.ratedAt ? new Date(record.ratedAt).toLocaleString() : undefined + record.ratedAt && record.ratedAt !== '0001-01-01T00:00:00Z' + ? new Date(record.ratedAt).toLocaleString() + : undefined } >