return IgnoreCommand(apiResponse: response)
}
- if let c = registeredClasses.lazy.filter({ $0.canExecuteAPI(response.api) }).first {
+ if let c = registeredClasses.first(where: { $0.canExecuteAPI(response.api) }) {
return c.init(apiResponse: response)
}
}
#if ENABLE_JSON_LOG
+
return JSONViewCommand(apiResponse: response, command: concreteCommand(for: response))
+
#else
+
return concreteCommand(for: response)
+
#endif
}