Skip to content

Commit

Permalink
fix: prefer snapshot times once both loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Dec 6, 2024
1 parent 5a63f8f commit 2149e72
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,10 @@ export const sessionRecordingDataLogic = kea<sessionRecordingDataLogicType>([
const eventStart = meta?.start_time ? dayjs(meta.start_time) : null
const snapshotStart = firstSnapshot ? dayjs(firstSnapshot.timestamp) : null

if (snapshotStart && eventStart) {
return snapshotStart
}

return snapshotStart || eventStart
},
],
Expand All @@ -992,7 +996,7 @@ export const sessionRecordingDataLogic = kea<sessionRecordingDataLogicType>([

// whichever is latest
if (eventEnd && snapshotEnd) {
return eventEnd.isAfter(snapshotEnd) ? eventEnd : snapshotEnd
return snapshotEnd
}
return eventEnd || snapshotEnd
},
Expand Down

0 comments on commit 2149e72

Please sign in to comment.