From b8c624f3eaba4ee9adf8551e2b2c6a27ae0d07a3 Mon Sep 17 00:00:00 2001 From: Glax Date: Sat, 14 Dec 2024 17:55:20 +0100 Subject: [PATCH] AsuraToon crash when there is no search-results #296 --- Tranga/MangaConnectors/AsuraToon.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tranga/MangaConnectors/AsuraToon.cs b/Tranga/MangaConnectors/AsuraToon.cs index b19334a..ea05fcd 100644 --- a/Tranga/MangaConnectors/AsuraToon.cs +++ b/Tranga/MangaConnectors/AsuraToon.cs @@ -55,8 +55,8 @@ public class AsuraToon : MangaConnector private Manga[] ParsePublicationsFromHtml(HtmlDocument document) { HtmlNodeCollection mangaList = document.DocumentNode.SelectNodes("//a[starts-with(@href,'series')]"); - if (mangaList.Count < 1) - return Array.Empty(); + if (mangaList is null || mangaList.Count < 1) + return []; IEnumerable urls = mangaList.Select(a => $"https://asuracomic.net/{a.GetAttributeValue("href", "")}");