Skip to content

Commit

Permalink
can have no annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiao921 committed Feb 23, 2021
1 parent b34f557 commit e6cfbf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CHEF/Components/Watcher/ImageParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public void AddTags(HtmlNodeCollection tags)
/// <param name="entities"></param>
public void AddText(IReadOnlyList<EntityAnnotation> entities)
{
ImageText = entities[0].Description;
ImageText = entities.Count > 0 ? entities[0].Description : "";
}

public bool ContainTag(string tag) => _imageTags.Any(t => t.Contains(tag));
Expand Down

0 comments on commit e6cfbf7

Please sign in to comment.