null description causes errors
This commit is contained in:
parent
db84c9a7d9
commit
d2ff19e309
@ -99,8 +99,8 @@ namespace DataLayer
|
||||
Category = category;
|
||||
|
||||
// simple assigns
|
||||
Title = title.Trim();
|
||||
Description = description?.Trim();
|
||||
Title = title.Trim() ?? "";
|
||||
Description = description?.Trim() ?? "";
|
||||
LengthInMinutes = lengthInMinutes;
|
||||
ContentType = contentType;
|
||||
|
||||
|
||||
@ -252,7 +252,7 @@ namespace LibationWinForms
|
||||
private static string GetDescriptionDisplay(Book book)
|
||||
{
|
||||
var doc = new HtmlAgilityPack.HtmlDocument();
|
||||
doc.LoadHtml(book.Description);
|
||||
doc.LoadHtml(book?.Description ?? "");
|
||||
var noHtml = doc.DocumentNode.InnerText;
|
||||
return
|
||||
noHtml.Length < 63 ?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user