diff --git a/API/MangaConnectors/MangaPark.cs b/API/MangaConnectors/MangaPark.cs index 84b3f8a..97feea6 100644 --- a/API/MangaConnectors/MangaPark.cs +++ b/API/MangaConnectors/MangaPark.cs @@ -240,7 +240,7 @@ internal static class MangaParkHelper } internal static HtmlNode? GetNodeWith(this HtmlDocument document, string search) => document.DocumentNode.SelectSingleNode("/html").GetNodeWith(search); - internal static HtmlNode? GetNodeWith(this HtmlNode node, string search) => node.SelectNodes($"{node.XPath}//*[@qkey='{search}']").FirstOrDefault(); + internal static HtmlNode? GetNodeWith(this HtmlNode node, string search) => node.SelectNodes($"{node.XPath}//*[@qkey='{search}']")?.FirstOrDefault(); internal static HtmlNodeCollection? GetNodesWith(this HtmlDocument document, string search) => document.DocumentNode.SelectSingleNode("/html ").GetNodesWith(search); // ReSharper disable once ReturnTypeCanBeNotNullable HAP nullable internal static HtmlNodeCollection? GetNodesWith(this HtmlNode node, string search) => node.SelectNodes($"{node.XPath}//*[@qkey='{search}']");