Merge pull request #3853 from sbwalker/dev

fix route constructor
This commit is contained in:
Shaun Walker 2024-02-20 14:15:49 -05:00 committed by GitHub
commit 4af13058f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -67,7 +67,7 @@ else
// pane matches current pane // pane matches current pane
if (Name.ToLower() == pane.ToLower()) 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); var moduleType = Type.GetType(module.ModuleType);
if (moduleType != null) if (moduleType != null)

View File

@ -49,8 +49,7 @@ namespace Oqtane.Models
pos = PagePath.IndexOf("/" + Constants.ModuleDelimiter + "/"); pos = PagePath.IndexOf("/" + Constants.ModuleDelimiter + "/");
if (pos != -1) if (pos != -1)
{ {
ModuleId = PagePath.Substring(pos + 3); ModuleId = PagePath.Substring(pos + 3);
ModuleId = (int.TryParse(ModuleId, out _)) ? ModuleId : "-1";
PagePath = PagePath.Substring(0, pos); PagePath = PagePath.Substring(0, pos);
} }
if (ModuleId.Length != 0) if (ModuleId.Length != 0)