Skip to content

Commit 3d8c66f

Browse files
authored
Apply suggestions from code review
1 parent a5a4c03 commit 3d8c66f

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/Microsoft.OpenApi/Services/OpenApiUrlTreeNode.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,7 @@ public bool HasOperations(string label)
5959
{
6060
Utils.CheckArgumentNullOrEmpty(label, nameof(label));
6161

62-
if (PathItems == null)
63-
{
64-
return false;
65-
}
66-
67-
if (PathItems.TryGetValue(label, out var item))
68-
{
69-
return item.Operations?.Any() ?? false;
70-
}
71-
72-
return false;
62+
return PathItems is not null && PathItems.TryGetValue(label, out var item) && item.Operations is not null && item.Operations.Any();
7363
}
7464

7565
/// <summary>

0 commit comments

Comments
 (0)