ensuring the range passed in is valid.
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
b021e14030
commit
5b4358e9e9
@ -418,8 +418,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