Skip to content

Commit

Permalink
Merge pull request #889 from cloudygeek/patch-1
Browse files Browse the repository at this point in the history
Update Options.swift
  • Loading branch information
pichillilorenzo authored Apr 15, 2022
2 parents 6e5669f + 27c3e71 commit c41e95a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ios/Classes/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ public class Options<T>: NSObject {

func parse(options: [String: Any?]) -> Options {
for (key, value) in options {
if value != nil, !(value is NSNull) {
if self.responds(to: Selector(key)) {
self.setValue(value, forKey: key)
}
if !(value is NSNull), value != nil, self.responds(to: Selector(key)) {
self.setValue(value, forKey: key)
}
}
return self
Expand Down

0 comments on commit c41e95a

Please sign in to comment.