Skip to content

Commit

Permalink
Merge pull request #44 from AlrzAmini/main
Browse files Browse the repository at this point in the history
Simplify UpdateTags by removing redundant null check
  • Loading branch information
thisisnabi authored Jul 30, 2024
2 parents 2fb84a1 + 6165766 commit 31627b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/Blogger.Domain/ArticleAggregate/Article.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ public void UpdateDraft(string title, string summary, string body)

public void UpdateTags(IReadOnlyList<Tag> tags)
{
if (_tags is not null)
_tags.Clear();
_tags.Clear();

AddTags(tags);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Blogger.Domain/ArticleAggregate/Tag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ public static Tag Create(string tagValue)

public override string ToString()
{
return Value.ToString();
return Value;
}
}

0 comments on commit 31627b5

Please sign in to comment.