mirror of
https://github.com/g3rv4/GetMoarFediverse.git
synced 2024-11-24 16:43:17 +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,7 +121,13 @@ await Parallel.ForEachAsync(sitesTags, new ParallelOptions{MaxDegreeOfParallelis
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int count = 0;
|
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)))
|
foreach (var statusLink in data.OrderedItems.Where(i => !imported.Contains(i)))
|
||||||
{
|
{
|
||||||
statusesToLoadBag.Add(statusLink);
|
statusesToLoadBag.Add(statusLink);
|
||||||
@ -164,7 +170,7 @@ File.WriteAllLines(importedPath, importedList);
|
|||||||
|
|
||||||
public class TagResponse
|
public class TagResponse
|
||||||
{
|
{
|
||||||
public string[] OrderedItems { get; }
|
public string[]? OrderedItems { get; }
|
||||||
|
|
||||||
public TagResponse(string[] orderedItems)
|
public TagResponse(string[] orderedItems)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user