Fix crash
This commit is contained in:
parent
a3131ba4d2
commit
55619c54f9
1 changed files with 3 additions and 0 deletions
|
|
@ -281,6 +281,9 @@ public func messageTextWithAttributes(message: EngineMessage) -> NSAttributedStr
|
|||
}
|
||||
|
||||
let range = NSRange(location: entity.range.lowerBound, length: entity.range.upperBound - entity.range.lowerBound)
|
||||
if range.upperBound >= updatedString.length {
|
||||
continue
|
||||
}
|
||||
|
||||
let currentDict = updatedString.attributes(at: range.lowerBound, effectiveRange: nil)
|
||||
var updatedAttributes: [NSAttributedString.Key: Any] = currentDict
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue