From 88f044eb4cff44824040101fdec41ef58a0a6cb5 Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 21 Sep 2025 04:24:40 +0200 Subject: [PATCH] Fix nullable in GetNodewith --- API/MangaConnectors/MangaPark.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}']");