Skip to content

Commit b62028a

Browse files
committed
fix(msteams): use Array#toSorted to satisfy no-array-sort lint
1 parent cd13970 commit b62028a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extensions/msteams/src/graph-thread.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export async function fetchThreadReplies(
142142
// back to arrival order (Graph returns oldest-first) when any timestamp is missing.
143143
const allTimestamped = items.every((m) => Number.isFinite(Date.parse(m.createdDateTime ?? "")));
144144
const ordered = allTimestamped
145-
? [...items].sort((a, b) => Date.parse(a.createdDateTime ?? "") - Date.parse(b.createdDateTime ?? ""))
145+
? items.toSorted((a, b) => Date.parse(a.createdDateTime ?? "") - Date.parse(b.createdDateTime ?? ""))
146146
: items;
147147
return ordered.slice(-want);
148148
}

0 commit comments

Comments
 (0)