Skip to content

Commit 3e59129

Browse files
committed
Update
1 parent a2edca4 commit 3e59129

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Core/Sources/ChatService/DynamicContextController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ final class DynamicContextController {
6060
let idIndexMap = chatModels.enumerated().reduce(into: [String: Int]()) {
6161
$0[$1.element.id] = $1.offset
6262
}
63-
return ids.sorted(by: {
63+
return ids.filter { !$0.isEmpty }.sorted(by: {
6464
let lhs = idIndexMap[$0] ?? Int.max
6565
let rhs = idIndexMap[$1] ?? Int.max
6666
return lhs < rhs

0 commit comments

Comments
 (0)