fixed issue where modulestate was being modified and not treated as a readonly cache

This commit is contained in:
Shaun Walker
2020-11-09 15:35:32 -05:00
parent a8932ec1e0
commit 07519bccde
3 changed files with 20 additions and 10 deletions

View File

@ -1,4 +1,4 @@
@using Microsoft.AspNetCore.Components.Rendering
@using Microsoft.AspNetCore.Components.Rendering
@namespace Oqtane.UI
@inject IUserService UserService
@inject IModuleService ModuleService
@ -53,8 +53,8 @@ else
if (module != null && !module.IsDeleted)
{
var typename = module.ModuleType;
// check for core module actions component
if (Constants.DefaultModuleActions.Contains(PageState.Action))
// check for core module actions component
if (Constants.DefaultModuleActions.Contains(PageState.Action))
{
typename = Constants.DefaultModuleActionsTemplate.Replace(Constants.ActionToken, PageState.Action);
}
@ -91,17 +91,13 @@ else
if (authorized)
{
if (!Constants.DefaultModuleActions.Contains(PageState.Action) && module.ControlTitle != "")
{
module.Title = module.ControlTitle;
}
CreateComponent(builder, module);
}
}
else
{
// module control does not exist with name specified
}
// module control does not exist with name specified
}
}
}
}