guard
This commit is contained in:
parent
02a39a2f91
commit
db61701c2c
@ -18,7 +18,8 @@
|
|||||||
public var options: [String] = []
|
public var options: [String] = []
|
||||||
public var selectedIndex: Int = 0
|
public var selectedIndex: Int = 0
|
||||||
|
|
||||||
public override func formFieldValue() -> AnyHashable? {
|
public override func formFieldValue() -> AnyHashable? {
|
||||||
|
guard !options.isEmpty else { return nil }
|
||||||
return options[selectedIndex]
|
return options[selectedIndex]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user