From ad8a261b6dd1ff8ebdbdf3f2e39221239e099d81 Mon Sep 17 00:00:00 2001 From: Ryan Morales Date: Thu, 20 May 2021 08:39:26 -0700 Subject: [PATCH] handle condition definitions that don't have values (#632) fix for issue: https://github.com/adobe/aepsdk-core-ios/issues/630 --- AEPCore/Sources/rules/JSONRulesParser.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AEPCore/Sources/rules/JSONRulesParser.swift b/AEPCore/Sources/rules/JSONRulesParser.swift index 8df03fc2e..cd5b7be5d 100644 --- a/AEPCore/Sources/rules/JSONRulesParser.swift +++ b/AEPCore/Sources/rules/JSONRulesParser.swift @@ -97,7 +97,8 @@ class JSONCondition: Codable { } return nil case .matcher: - if let key = definition.key, let matcher = definition.matcher, let values = definition.values { + let values = definition.values ?? [] + if let key = definition.key, let matcher = definition.matcher { if values.count == 0 { return convert(key: key, matcher: matcher, anyCodable: "") }