Skip to content

Commit

Permalink
Merge pull request #4742 from wikimedia/native-editor-crash
Browse files Browse the repository at this point in the history
Native Editor - Fix iOS 16 crash
  • Loading branch information
staykids authored Feb 9, 2024
2 parents 8acdd64 + 62bf70b commit 1c46a9a
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 1c46a9a

Please sign in to comment.