mirror of
https://github.com/g3rv4/GetMoarFediverse.git
synced 2024-11-21 23:23:09 +01:00
fix NRE when OrderedItems is null (and log it, I'm curious) (#38)
This commit is contained in:
parent
91ac0e2385
commit
6fd7804d6c
@ -121,8 +121,14 @@ await Parallel.ForEachAsync(sitesTags, new ParallelOptions{MaxDegreeOfParallelis
|
||||
return;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
foreach (var statusLink in data.OrderedItems.Where(i=>!imported.Contains(i)))
|
||||
if (data.OrderedItems == null)
|
||||
{
|
||||
Console.WriteLine($"Got null on OrderedItems when pulling #{tag} posts from {site}");
|
||||
return;
|
||||
}
|
||||
|
||||
var count = 0;
|
||||
foreach (var statusLink in data.OrderedItems.Where(i => !imported.Contains(i)))
|
||||
{
|
||||
statusesToLoadBag.Add(statusLink);
|
||||
count++;
|
||||
@ -164,7 +170,7 @@ File.WriteAllLines(importedPath, importedList);
|
||||
|
||||
public class TagResponse
|
||||
{
|
||||
public string[] OrderedItems { get; }
|
||||
public string[]? OrderedItems { get; }
|
||||
|
||||
public TagResponse(string[] orderedItems)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user