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

Commit 9337012

Browse files
authored
Merge pull request #58 from revolution42/patch-1
Issue when using multiple ApplicationEventHandler
2 parents 60bc7b8 + c5c9585 commit 9337012

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)