null description causes errors
This commit is contained in:
parent
db84c9a7d9
commit
d2ff19e309
2 changed files with 3 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue