mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-05 23:29:00 +02:00
Fix wrong date in history view when looking at labeled version (#27450)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> GitOrigin-RevId: 87b6f82e3024334d03991db794dd11301918245e
This commit is contained in:
+8
-4
@@ -47,10 +47,14 @@ function LabelListItem({
|
||||
}: LabelListItemProps) {
|
||||
const { t } = useTranslation()
|
||||
|
||||
// first label
|
||||
const fromVTimestamp = Date.parse(labels[labels.length - 1].created_at)
|
||||
// most recent label
|
||||
const toVTimestamp = Date.parse(labels[0].created_at)
|
||||
// first label - use the actual version timestamp, fallback to created_at if not available
|
||||
const fromLabel = labels[labels.length - 1]
|
||||
const fromVTimestamp =
|
||||
fromLabel.lastUpdatedTimestamp ?? Date.parse(fromLabel.created_at)
|
||||
// most recent label - use the actual version timestamp, fallback to created_at if not available
|
||||
const toLabel = labels[0]
|
||||
const toVTimestamp =
|
||||
toLabel.lastUpdatedTimestamp ?? Date.parse(toLabel.created_at)
|
||||
|
||||
const updateRange: UpdateRange = {
|
||||
fromV: version,
|
||||
|
||||
Reference in New Issue
Block a user