diff --git a/API/MangaConnectors/MangaDex.cs b/API/MangaConnectors/MangaDex.cs index cc78dfe..47c30d5 100644 --- a/API/MangaConnectors/MangaDex.cs +++ b/API/MangaConnectors/MangaDex.cs @@ -277,9 +277,9 @@ public class MangaDex : MangaConnector _ => kv.Key }; return new Link(key, url); - }).ToList()!; + }).ToList()??[]; - List altTitles = (altTitlesJArray??[]) + List altTitles = altTitlesJArray? .Select(t => { JObject? j = t as JObject; @@ -287,19 +287,19 @@ public class MangaDex : MangaConnector if (p is null) return null; return new AltTitle(p.Name, p.Value.ToString()); - }).Where(x => x is not null).ToList()!; + }).Where(x => x is not null).Cast().ToList()??[]; - List tags = (tagsJArray??[]) + List tags = tagsJArray? .Where(t => t.Value("type") == "tag") .Select(t => t["attributes"]?["name"]?.Value("en")??t["attributes"]?["name"]?.First?.First?.Value()) .Select(str => str is not null ? new MangaTag(str) : null) - .Where(x => x is not null).ToList()!; + .Where(x => x is not null).Cast().ToList()??[]; List authors = relationships .Where(r => r["type"]?.Value() == "author") .Select(t => t["attributes"]?.Value("name")) .Select(str => str is not null ? new Author(str) : null) - .Where(x => x is not null).ToList()!; + .Where(x => x is not null).Cast().ToList(); MangaReleaseStatus releaseStatus = status switch