diff --git a/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs b/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs index 1abb23e1e..c54ea11a0 100644 --- a/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs +++ b/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs @@ -24,8 +24,8 @@ public async Task> GetAllAsync() var request = new RestRequest(endpoint); var response = await _apiClient.ExecuteAsync>(request); return response.SelectMany(r => - r.GetType().GetProperties().Where(p => p.GetType() == typeof(Uri)).Select(p => (Uri)p.GetValue(r))) - .Where(u => u != null); + r.GetType().GetProperties().Where(p => p.GetType() == typeof(Uri) && p.GetValue(r) != null) + .Select(p => (Uri)p.GetValue(r))); } private static string BuildEndpoint()