Skip to content

Commit

Permalink
Fix sort messages (jupyterlab#975)
Browse files Browse the repository at this point in the history
* fix sort messages

* prettier
  • Loading branch information
michaelchia authored and Marchlak committed Oct 28, 2024
1 parent 3b8ff46 commit 08a6c17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jupyter-ai/src/components/chat-messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ function sortMessages(
*/

const aOriginTimestamp =
a.type === 'agent' && a.reply_to in timestampsById
'reply_to' in a && a.reply_to in timestampsById
? timestampsById[a.reply_to]
: a.time;
const bOriginTimestamp =
b.type === 'agent' && b.reply_to in timestampsById
'reply_to' in b && b.reply_to in timestampsById
? timestampsById[b.reply_to]
: b.time;

Expand Down

0 comments on commit 08a6c17

Please sign in to comment.