AsuraToon crash when there is no search-results #296

This commit is contained in:
Glax 2024-12-14 17:55:20 +01:00
parent 93cfdddd19
commit b8c624f3ea

View File

@ -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<Manga>();
if (mangaList is null || mangaList.Count < 1)
return [];
IEnumerable<string> urls = mangaList.Select(a => $"https://asuracomic.net/{a.GetAttributeValue("href", "")}");