Guard in link code.
This commit is contained in:
parent
9c6ded77e2
commit
2d83b8a6ef
@ -10,7 +10,7 @@ import UIKit
|
|||||||
import VDSColorTokens
|
import VDSColorTokens
|
||||||
import VDS
|
import VDS
|
||||||
|
|
||||||
@objcMembers open class Link: VDS.TextLink, VDSMoleculeViewProtocol {
|
open class Link: VDS.TextLink, VDSMoleculeViewProtocol {
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Public Properties
|
// MARK: - Public Properties
|
||||||
@ -43,14 +43,13 @@ import VDS
|
|||||||
open override func updateAccessibility() {
|
open override func updateAccessibility() {
|
||||||
super.updateAccessibility()
|
super.updateAccessibility()
|
||||||
|
|
||||||
if let viewModel {
|
guard let viewModel = viewModel else { return }
|
||||||
if let accessibilityText = viewModel.accessibilityText {
|
if let accessibilityText = viewModel.accessibilityText {
|
||||||
self.accessibilityLabel = accessibilityText
|
self.accessibilityLabel = accessibilityText
|
||||||
}
|
}
|
||||||
|
|
||||||
if let accessibilityIdentifier = viewModel.accessibilityIdentifier {
|
if let accessibilityIdentifier = viewModel.accessibilityIdentifier {
|
||||||
self.accessibilityIdentifier = accessibilityIdentifier
|
self.accessibilityIdentifier = accessibilityIdentifier
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user