Skip to content

Commit b8c624f

Browse files
committed
AsuraToon crash when there is no search-results #296
1 parent 93cfddd commit b8c624f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tranga/MangaConnectors/AsuraToon.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public override Manga[] GetManga(string publicationTitle = "")
5555
private Manga[] ParsePublicationsFromHtml(HtmlDocument document)
5656
{
5757
HtmlNodeCollection mangaList = document.DocumentNode.SelectNodes("//a[starts-with(@href,'series')]");
58-
if (mangaList.Count < 1)
59-
return Array.Empty<Manga>();
58+
if (mangaList is null || mangaList.Count < 1)
59+
return [];
6060

6161
IEnumerable<string> urls = mangaList.Select(a => $"https://asuracomic.net/{a.GetAttributeValue("href", "")}");
6262

0 commit comments

Comments
 (0)