ensuring the range passed in is valid.
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
0a8e8ad98d
commit
6888fe93b8
@ -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