Update Options.swift
checking if object is null before checking if nil. causes to crash if null.
This commit is contained in:
parent
f06bcdf695
commit
3c60c15a81
|
@ -16,7 +16,7 @@ public class Options<T>: NSObject {
|
|||
|
||||
func parse(options: [String: Any?]) -> Options {
|
||||
for (key, value) in options {
|
||||
if value != nil, !(value is NSNull), self.responds(to: Selector(key)) {
|
||||
if !(value is NSNull), value != nil, self.responds(to: Selector(key)) {
|
||||
self.setValue(value, forKey: key)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue