Merge pull request #5270 from leigh-pointer/ModBase

GetUrlParameters crash
This commit is contained in:
Shaun Walker 2025-04-30 13:47:21 -04:00 committed by GitHub
commit 9e34295529
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,7 +17,7 @@ namespace Oqtane.Modules
public abstract class ModuleBase : ComponentBase, IModuleControl
{
private Logger _logger;
private string _urlparametersstate;
private string _urlparametersstate = string.Empty;
private Dictionary<string, string> _urlparameters;
private bool _scriptsloaded = false;
@ -62,7 +62,7 @@ namespace Oqtane.Modules
public Dictionary<string, string> UrlParameters {
get
{
if (_urlparametersstate == null || _urlparametersstate != PageState.UrlParameters)
if (string.IsNullOrEmpty(_urlparametersstate) || _urlparametersstate != PageState.UrlParameters)
{
_urlparametersstate = PageState.UrlParameters;
_urlparameters = GetUrlParameters(UrlParametersTemplate);