Fixes up UmbracoContextFactory to ensure it's not returning a disposed Umbraco context
This commit is contained in:
@@ -64,7 +64,7 @@ namespace Umbraco.Web
|
||||
public UmbracoContextReference EnsureUmbracoContext(HttpContextBase httpContext = null)
|
||||
{
|
||||
var currentUmbracoContext = _umbracoContextAccessor.UmbracoContext;
|
||||
if (currentUmbracoContext != null)
|
||||
if (currentUmbracoContext != null && !currentUmbracoContext.Disposed)
|
||||
return new UmbracoContextReference(currentUmbracoContext, false, _umbracoContextAccessor);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user