Skip to content

Commit

Permalink
Avoid Null Reference Exception (#17568)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Hisham Bin Ateya <[email protected]>
  • Loading branch information
MikeAlhayek and hishamco authored Mar 6, 2025
1 parent 4b92d86 commit ca19f85
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public Task BuildNavigationAsync(MenuItem menuItem, NavigationBuilder builder, I
try
{
var treeBuilder = treeNodeBuilders.FirstOrDefault(x => x.Name == childTreeNode.GetType().Name);
await treeBuilder.BuildNavigationAsync(childTreeNode, itemBuilder, treeNodeBuilders);
await treeBuilder?.BuildNavigationAsync(childTreeNode, itemBuilder, treeNodeBuilders);
}
catch (Exception e)
{
Expand Down

0 comments on commit ca19f85

Please sign in to comment.