From 19ffe781e68dcc9fdd339bf0508642407a47ce11 Mon Sep 17 00:00:00 2001 From: Caleb Jones Date: Mon, 3 May 2021 10:31:54 -0400 Subject: [PATCH] Fix parsing crash on null value. --- ios/Classes/Options.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ios/Classes/Options.swift b/ios/Classes/Options.swift index 286a2f83..96ba50eb 100755 --- a/ios/Classes/Options.swift +++ b/ios/Classes/Options.swift @@ -16,8 +16,10 @@ public class Options: 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 is NSNull) { + if self.responds(to: Selector(key)) { + self.setValue(value, forKey: key) + } } } return self