Skip to content

Commit

Permalink
AsuraToon crash when there is no search-results #296
Browse files Browse the repository at this point in the history
  • Loading branch information
C9Glax committed Dec 14, 2024
1 parent 93cfddd commit b8c624f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tranga/MangaConnectors/AsuraToon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public override Manga[] GetManga(string publicationTitle = "")
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", "")}");

Expand Down

0 comments on commit b8c624f

Please sign in to comment.