Skip to content

Commit

Permalink
When there were no dependencies DependsOn was null
Browse files Browse the repository at this point in the history
(cherry picked from commit 1c4d687)
  • Loading branch information
Michael-Herzog authored and markwoerdenweber committed Dec 11, 2024
1 parent 9a06b77 commit a65c18f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public IEnumerable<string> 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<IThemeRegistry>();
Expand Down

0 comments on commit a65c18f

Please sign in to comment.