We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2edca4 commit 3e59129Copy full SHA for 3e59129
1 file changed
Core/Sources/ChatService/DynamicContextController.swift
@@ -60,7 +60,7 @@ final class DynamicContextController {
60
let idIndexMap = chatModels.enumerated().reduce(into: [String: Int]()) {
61
$0[$1.element.id] = $1.offset
62
}
63
- return ids.sorted(by: {
+ return ids.filter { !$0.isEmpty }.sorted(by: {
64
let lhs = idIndexMap[$0] ?? Int.max
65
let rhs = idIndexMap[$1] ?? Int.max
66
return lhs < rhs
0 commit comments