From a65c18fe53eeb3c1d9536ed71ebdc383b77f5f0c Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Wed, 11 Dec 2024 11:28:15 +0100 Subject: [PATCH] When there were no dependencies DependsOn was null (cherry picked from commit 1c4d687a7c1453a394dfe881fcf5e86ecb0f8bb7) --- src/Smartstore.Web.Common/Razor/ModuleViewLocationExpander.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Smartstore.Web.Common/Razor/ModuleViewLocationExpander.cs b/src/Smartstore.Web.Common/Razor/ModuleViewLocationExpander.cs index 027307a268..63198bd9d7 100644 --- a/src/Smartstore.Web.Common/Razor/ModuleViewLocationExpander.cs +++ b/src/Smartstore.Web.Common/Razor/ModuleViewLocationExpander.cs @@ -34,7 +34,7 @@ public IEnumerable ExpandViewLocations(ViewLocationExpanderContext conte if (context.Values.TryGetValue(ThemeViewLocationExpander.ParamKey, out var themeName)) // HP { var themeModule = _moduleCatalog.GetModuleByTheme(themeName); - if (themeModule != null && themeModule.DependsOn.Contains(module.SystemName)) + if (themeModule?.DependsOn?.Contains(module.SystemName) == true) { // Current theme's companion module depends on current module var themeRegistry = context.ActionContext.HttpContext.RequestServices.GetRequiredService();