Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Entities/WorkItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public void AddTimeByState(TimeByState timeByState)

public void AddTimesByState(IEnumerable<TimeByState> timesByState)
{
if (timesByState is not null && !timesByState.Any())
if (timesByState is null || timesByState?.Any() == false)
return;

foreach (var timeByState in timesByState)
Expand Down
4 changes: 2 additions & 2 deletions src/Extensions/HelperExtenions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public static string ExtractEmail(this string user)
if (user is null)
return user;

if (!user.Contains(" <") && !user.TrimEnd().Contains(">"))
if (!user.Contains(" <") && !user.TrimEnd().Contains('>'))
return user;

return user.Split("<").LastOrDefault().Split(">").FirstOrDefault();
return user.Split('<').LastOrDefault()?.Split('>')?.FirstOrDefault();
}

public static string ToTextTime(this TimeSpan timeSpan)
Expand Down