mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Optimizing ThemeFilter with Cache enabled
--HG-- branch : NH3
This commit is contained in:
@@ -24,6 +24,10 @@ namespace Orchard.Themes.Preview {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void OnResultExecuting(ResultExecutingContext filterContext) {
|
public void OnResultExecuting(ResultExecutingContext filterContext) {
|
||||||
|
if(filterContext.Result as ViewResult == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var previewThemeName = _previewTheme.GetPreviewTheme();
|
var previewThemeName = _previewTheme.GetPreviewTheme();
|
||||||
if (string.IsNullOrEmpty(previewThemeName))
|
if (string.IsNullOrEmpty(previewThemeName))
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user