File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -187,17 +187,17 @@ public class AnonymousUserManager: AnonymousUserManagerProtocol {
187
187
private func evaluateCriteriaAndReturnID( ) -> String ? {
188
188
guard let criteriaData = localStorage. criteriaData else { return nil }
189
189
190
- var events : [ [ AnyHashable : Any ] ] ?
190
+ var events = [ [ AnyHashable: Any] ] ( )
191
191
192
192
if let anonymousUserEvents = localStorage. anonymousUserEvents {
193
- events? . append ( contentsOf: anonymousUserEvents)
193
+ events. append ( contentsOf: anonymousUserEvents)
194
194
}
195
195
196
196
if let userUpdate = localStorage. anonymousUserUpdate {
197
- events? . append ( userUpdate)
197
+ events. append ( userUpdate)
198
198
}
199
199
200
- guard let events else { return nil }
200
+ guard events. count > 0 else { return nil }
201
201
202
202
return CriteriaCompletionChecker ( anonymousCriteria: criteriaData, anonymousEvents: events) . getMatchedCriteria ( )
203
203
}
You can’t perform that action at this time.
0 commit comments