Merge branch 'bugfix/develop-atomic-label-range' into 'develop'
Digital PCT265 defect CXTDT-536188 - Validation of ranges. ### Summary Adding NSRange validation for Actions to ensure there isn't an out of bounds crash. ### JIRA Ticket https://onejira.verizon.com/browse/CXTDT-536188 Co-authored-by: Matt Bruce <matt.bruce@verizon.com> See merge request https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui/-/merge_requests/1084
This commit is contained in:
commit
9c36bbf38f
@ -421,8 +421,8 @@ extension Label {
|
||||
|
||||
/// Underlines the tappable region and stores the tap logic for interation.
|
||||
private func setTextLinkState(range: NSRange, actionBlock: @escaping ActionBlock) {
|
||||
guard range.length > 0 else { return }
|
||||
|
||||
guard let text, text.isValid(range: range) else { return }
|
||||
|
||||
var textLink = ActionLabelAttribute(location: range.location, length: range.length)
|
||||
textLink.subscriber = textLink
|
||||
.action
|
||||
|
||||
Loading…
Reference in New Issue
Block a user