Merge branch 'bugfix/CXTDT-531370' into 'release/11_4_0'
doing extra guards for actionMap and actionText range to ensure a valid... ### Summary nil ActionMap being sent to the Label which caused a range issue. Guards were put in place to ensure this can't happen. ### JIRA Ticket https://onejira.verizon.com/browse/CXTDT-531370 Co-authored-by: Matt Bruce <matt.bruce@verizon.com> See merge request https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui/-/merge_requests/1075
This commit is contained in:
commit
59ea9ca2bd
@ -418,6 +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 }
|
||||
|
||||
var textLink = ActionLabelAttribute(location: range.location, length: range.length)
|
||||
textLink.subscriber = textLink
|
||||
.action
|
||||
@ -437,6 +439,8 @@ extension Label {
|
||||
}
|
||||
|
||||
public func createActionBlockFor(actionMap: [AnyHashable: Any]?, additionalData: [AnyHashable: Any]?, delegateObject: DelegateObject?) -> ActionBlock? {
|
||||
guard let actionMap else { return nil }
|
||||
|
||||
return { [weak self] in
|
||||
guard let self = self else { return }
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user