Skip to content

Commit 31627b5

Browse files
authored
Merge pull request #44 from AlrzAmini/main
Simplify UpdateTags by removing redundant null check
2 parents 2fb84a1 + 6165766 commit 31627b5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Blogger.Domain/ArticleAggregate/Article.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ public void UpdateDraft(string title, string summary, string body)
8686

8787
public void UpdateTags(IReadOnlyList<Tag> tags)
8888
{
89-
if (_tags is not null)
90-
_tags.Clear();
89+
_tags.Clear();
9190

9291
AddTags(tags);
9392
}

src/Blogger.Domain/ArticleAggregate/Tag.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ public static Tag Create(string tagValue)
2020

2121
public override string ToString()
2222
{
23-
return Value.ToString();
23+
return Value;
2424
}
2525
}

0 commit comments

Comments
 (0)