Skip to content

Commit

Permalink
Merge pull request #828 from ItsCalebJones/bugfix/parsing_error
Browse files Browse the repository at this point in the history
Fix parsing crash on null value.
  • Loading branch information
pichillilorenzo authored Apr 15, 2022
2 parents f074b7a + 099223a commit d1aa8b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ios/Classes/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ 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)) {
self.setValue(value, forKey: key)
if value != nil, !(value is NSNull) {
if self.responds(to: Selector(key)) {
self.setValue(value, forKey: key)
}
}
}
return self
Expand Down

0 comments on commit d1aa8b0

Please sign in to comment.