Skip to content

Commit 9de62bb

Browse files
authored
Merge pull request #15 from typinghard/bugfix/version-5
Updating WorkItem.cs and HelperExtensions.cs
2 parents 4256584 + 886eee8 commit 9de62bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Entities/WorkItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public void AddTimeByState(TimeByState timeByState)
9595

9696
public void AddTimesByState(IEnumerable<TimeByState> timesByState)
9797
{
98-
if (timesByState is not null && !timesByState.Any())
98+
if (timesByState is null || timesByState?.Any() == false)
9999
return;
100100

101101
foreach (var timeByState in timesByState)

src/Extensions/HelperExtenions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ public static string ExtractEmail(this string user)
2222
if (user is null)
2323
return user;
2424

25-
if (!user.Contains(" <") && !user.TrimEnd().Contains(">"))
25+
if (!user.Contains(" <") && !user.TrimEnd().Contains('>'))
2626
return user;
2727

28-
return user.Split("<").LastOrDefault().Split(">").FirstOrDefault();
28+
return user.Split('<').LastOrDefault()?.Split('>')?.FirstOrDefault();
2929
}
3030

3131
public static string ToTextTime(this TimeSpan timeSpan)

0 commit comments

Comments
 (0)