Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit c5c9585

Browse files
authored
Issue when using multiple ApplicationEventHandler
When using multiple ApplicationEventHandler the order can not always be specified. This allows the the default controller to be specified in another startup function.
1 parent 60bc7b8 commit c5c9585

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Our.Umbraco.DocTypeGridEditor/Bootstrap.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplic
1414
{
1515
GlobalFilters.Filters.Add(new DocTypeGridEditorPreviewAttribute());
1616

17-
DefaultDocTypeGridEditorSurfaceControllerResolver.Current = new DefaultDocTypeGridEditorSurfaceControllerResolver();
17+
if (!DefaultDocTypeGridEditorSurfaceControllerResolver.HasCurrent)
18+
{
19+
DefaultDocTypeGridEditorSurfaceControllerResolver.Current = new DefaultDocTypeGridEditorSurfaceControllerResolver();
20+
}
1821
}
1922

2023
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
@@ -47,4 +50,4 @@ private void ExpireContentTypeCache(IContentTypeService sender, SaveEventArgs<IC
4750
}
4851
}
4952
}
50-
}
53+
}

0 commit comments

Comments
 (0)