Fix sortNumber when volume null

This commit is contained in:
glax 2023-06-05 19:45:50 +02:00
parent 61712d0537
commit d4f47e057c

View File

@ -27,7 +27,7 @@ public struct Chapter
{
NumberDecimalSeparator = "."
};
sortNumber = decimal.Round(Convert.ToDecimal(this.volumeNumber) * Convert.ToDecimal(this.chapterNumber, nfi), 1)
sortNumber = decimal.Round(Convert.ToDecimal(this.volumeNumber ?? "1") * Convert.ToDecimal(this.chapterNumber, nfi), 1)
.ToString(nfi);
string chapterName = string.Concat(LegalCharacters.Matches(name ?? ""));