Skip to content

Commit 7920810

Browse files
committed
fix bug in bs4 side nav
1 parent d5e2778 commit 7920810

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/cloudscribe.Web.Navigation/NavigationViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public TreeNode<NavigationNode> StartingNode
7878
{
7979
if (startingNode == null)
8080
{
81-
if (startingNodeKey.Length > 0 && startingNodeKey != "RootNode")
81+
if (!string.IsNullOrWhiteSpace(startingNodeKey) && startingNodeKey != "RootNode")
8282
{
8383
startingNode = RootNode.FindByKey(startingNodeKey);
8484
if (startingNode == null)
@@ -306,7 +306,7 @@ private bool IsAllowedByAdjuster(TreeNode<NavigationNode> node)
306306
private bool FilterIsAllowed(TreeNode<NavigationNode> node)
307307
{
308308
if (string.IsNullOrEmpty(node.Value.ComponentVisibility)) { return true; }
309-
if (navigationFilterName.Length == 0) { return false; }
309+
if (string.IsNullOrWhiteSpace(navigationFilterName)) { return false; }
310310
if (node.Value.ComponentVisibility.Contains(navigationFilterName)) { return true; }
311311

312312
return false;

src/cloudscribe.Web.Navigation/Views/Shared/Bs4SideNavPartial.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
@Html.Raw(Model.GetIcon(childNode.Value))@childNode.Value.Text
2929
</a>
3030
@Model.UpdateTempNode(childNode)
31-
@Html.Partial("SideNavPartial", Model) @* recursion *@
31+
@Html.Partial("Bs4SideNavPartial", Model) @* recursion *@
3232
</li>
3333
}
3434
else

src/cloudscribe.Web.Navigation/Views/Shared/Components/Navigation/Bs4SideNav.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<li class="nav-item">
2626
<a class="nav-link active" href="@Url.Content(Model.AdjustUrl(node))">@Html.Raw(Model.GetIcon(node.Value))@Model.AdjustText(node)</a>
2727
@Model.UpdateTempNode(node)
28-
@Html.Partial("SideNavPartial", Model)
28+
@Html.Partial("Bs4SideNavPartial", Model)
2929
</li>
3030
}
3131
else

src/cloudscribe.Web.Navigation/cloudscribe.Web.Navigation.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<PropertyGroup>
44
<Description>an ASP.NET Core viewcomponent for menus and breadcrumbs</Description>
5-
<VersionPrefix>2.0.10</VersionPrefix>
6-
<AssemblyVersion>2.0.10</AssemblyVersion>
5+
<VersionPrefix>2.0.11</VersionPrefix>
6+
<AssemblyVersion>2.0.11</AssemblyVersion>
77
<Authors>Joe Audette</Authors>
88
<TargetFrameworks>netstandard2.0</TargetFrameworks>
99
<AssemblyName>cloudscribe.Web.Navigation</AssemblyName>

0 commit comments

Comments
 (0)