Skip to content

Commit

Permalink
fix(provider): fix comment sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbch committed Nov 19, 2024
1 parent 7cf77e9 commit e706537
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/provider/src/TiptapCollabProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export class TiptapCollabProvider extends HocuspocusProvider {
return null
}

return [...this.getThreadComments(threadId) ?? [], ...this.getThreadComments(threadId, true) ?? []].sort((a, b) => a.createdAt - b.createdAt)
return [...this.getThreadComments(threadId) ?? [], ...this.getThreadComments(threadId, true) ?? []].sort((a, b) => a.createdAt.localeCompare(b.createdAt))
}

/**
Expand Down

0 comments on commit e706537

Please sign in to comment.