From f3f223fa227df62e15b3986c345386a18b329aa6 Mon Sep 17 00:00:00 2001 From: sbwalker Date: Tue, 20 Feb 2024 14:15:38 -0500 Subject: [PATCH] fix route constructor --- Oqtane.Client/UI/Pane.razor | 2 +- Oqtane.Shared/Models/Route.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Oqtane.Client/UI/Pane.razor b/Oqtane.Client/UI/Pane.razor index 3412d9598..606a83b99 100644 --- a/Oqtane.Client/UI/Pane.razor +++ b/Oqtane.Client/UI/Pane.razor @@ -67,7 +67,7 @@ else // pane matches current pane if (Name.ToLower() == pane.ToLower()) { - if (module.ModuleId == PageState.ModuleId && PageState.Action != Constants.DefaultAction) + if (PageState.ModuleId == module.ModuleId && PageState.Action != Constants.DefaultAction) { var moduleType = Type.GetType(module.ModuleType); if (moduleType != null) diff --git a/Oqtane.Shared/Models/Route.cs b/Oqtane.Shared/Models/Route.cs index 73d648fa4..b5a608f36 100644 --- a/Oqtane.Shared/Models/Route.cs +++ b/Oqtane.Shared/Models/Route.cs @@ -49,8 +49,7 @@ public Route(string route, string aliaspath) pos = PagePath.IndexOf("/" + Constants.ModuleDelimiter + "/"); if (pos != -1) { - ModuleId = PagePath.Substring(pos + 3); - ModuleId = (int.TryParse(ModuleId, out _)) ? ModuleId : "-1"; + ModuleId = PagePath.Substring(pos + 3); PagePath = PagePath.Substring(0, pos); } if (ModuleId.Length != 0)