2
0

Fix MangaDex linksNode is null

This commit is contained in:
Glax 2024-04-26 00:48:55 +02:00
parent 3d855020eb
commit 4692cc297a

View File

@ -115,7 +115,7 @@ public class MangaDex : MangaConnector
}; };
Dictionary<string, string> linksDict = new(); Dictionary<string, string> linksDict = new();
if (attributes.TryGetPropertyValue("links", out JsonNode? linksNode)) if (attributes.TryGetPropertyValue("links", out JsonNode? linksNode) && linksNode is not null)
foreach (KeyValuePair<string, JsonNode?> linkKv in linksNode!.AsObject()) foreach (KeyValuePair<string, JsonNode?> linkKv in linksNode!.AsObject())
linksDict.TryAdd(linkKv.Key, linkKv.Value.GetValue<string>()); linksDict.TryAdd(linkKv.Key, linkKv.Value.GetValue<string>());