Skip to content

Commit

Permalink
Fixes wrong null-conditional operator usages. (#17114)
Browse files Browse the repository at this point in the history
  • Loading branch information
gvkries authored Dec 4, 2024
1 parent 80d8d24 commit de0346f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ await _authorizationService.AuthorizeAsync(User, OrchardCore.Deployment.CommonPe
[HttpPost]
public async Task<IActionResult> AddContentItems(long deploymentPlanId, string returnUrl, IEnumerable<long> itemIds)
{
if (itemIds?.Count() == 0)
if (itemIds is null || !itemIds.Any())
{
return this.LocalRedirect(returnUrl, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@foreach (var entry in Model.Entries)
{
var checkd = (Model.DirectoryPaths?.Contains(entry.Path) ?? false) || (Model.FilePaths?.Contains(entry.Path) ?? false);
var hasChildren = entry.Entries?.Count != 0;
var hasChildren = entry.Entries?.Count > 0;

<li class="list-group-item">
<div class="form-check">
Expand Down

0 comments on commit de0346f

Please sign in to comment.