mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-28 23:27:08 -04:00
Fixed: Use Array.Empty and fix a few multiple enumerations
(cherry picked from commit 11d91faaada0e70910c832ce405ddeed52a24172)
This commit is contained in:
@@ -14,14 +14,14 @@ namespace NzbDrone.Common.OAuth
|
||||
{
|
||||
get
|
||||
{
|
||||
var parameters = this.Where(p => p.Name.Equals(name));
|
||||
var parameters = this.Where(p => p.Name.Equals(name)).ToArray();
|
||||
|
||||
if (!parameters.Any())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (parameters.Count() == 1)
|
||||
if (parameters.Length == 1)
|
||||
{
|
||||
return parameters.Single();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user