Skip to content

Commit

Permalink
Add some extra safety for iOS 16 crash
Browse files Browse the repository at this point in the history
  • Loading branch information
tonisevener committed Feb 9, 2024
1 parent 8acdd64 commit 62bf70b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Components/Sources/ComponentsObjC/WKSourceEditorFormatter.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ - (BOOL)canEvaluateAttributedString: (NSAttributedString *)attributedString agai
return NO;
}

if (attributedString.length <= range.location) {
return NO;
}

if (attributedString.length < (range.location + range.length)) {
return NO;
}
Expand Down

0 comments on commit 62bf70b

Please sign in to comment.