Skip to content

Commit

Permalink
Remove unnecessary null coalescing operator (#16332)
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamco committed Jun 17, 2024
1 parent 670e1b1 commit e6d7a19
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public override async Task<IDisplayResult> UpdateAsync(MediaField field, IUpdate
}
}

field.Paths = items.Where(p => !p.IsRemoved).Select(p => p.Path).ToArray() ?? [];
field.Paths = items.Where(p => !p.IsRemoved).Select(p => p.Path).ToArray();

var settings = context.PartFieldDefinition.GetSettings<MediaFieldSettings>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class DefaultCommandManager : ICommandManager

public async Task ExecuteAsync(CommandParameters parameters)
{
var matches = MatchCommands(parameters) ?? [];
var matches = MatchCommands(parameters);

if (matches.Count == 1)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ private async Task<TDocument> GetInternalAsync(bool failover = false)
return document;
}

if (_isDistributed && (_options?.SlidingExpiration.HasValue ?? false))
if (_isDistributed && _options.SlidingExpiration.HasValue)
{
await _distributedCache.RefreshAsync(_options.CacheKey);
}
Expand Down

0 comments on commit e6d7a19

Please sign in to comment.