diff --git a/v4/layouts/partials/check-theme-prefer.html b/v4/layouts/partials/check-theme-prefer.html
index 0878cbbd..c6299b47 100644
--- a/v4/layouts/partials/check-theme-prefer.html
+++ b/v4/layouts/partials/check-theme-prefer.html
@@ -1,5 +1,5 @@
{{ $checkThemePrefer := resources.Get "js/check-theme-prefer.js" }}
-{{ if or (.Site.IsServer) (eq hugo.Environment "development") }}
+{{ if or (hugo.IsServer) (eq hugo.Environment "development") }}
{{ else }}
{{ $checkThemePrefer := $checkThemePrefer | resources.Minify | resources.Fingerprint }}
diff --git a/v4/layouts/partials/css.html b/v4/layouts/partials/css.html
index 5df6332f..631f6567 100644
--- a/v4/layouts/partials/css.html
+++ b/v4/layouts/partials/css.html
@@ -1,7 +1,7 @@
{{ $options := dict "targetPath" "theme.css" "enableSourceMap" true "precision" 6 }}
{{ $css := resources.Get "sass/theme.scss" | resources.ExecuteAsTemplate "theme.scss" . | toCSS $options }}
-{{ if or (.Site.IsServer) (eq hugo.Environment "development") }}
+{{ if or (hugo.IsServer) (eq hugo.Environment "development") }}
{{ else }}
{{ $css := $css | resources.Minify | resources.Fingerprint }}
diff --git a/v4/layouts/partials/js.html b/v4/layouts/partials/js.html
index 67fd781a..fac25e0d 100644
--- a/v4/layouts/partials/js.html
+++ b/v4/layouts/partials/js.html
@@ -27,7 +27,7 @@
{{ $js := $jsToConcat | resources.Concat "theme.js" }}
-{{ if or (.Site.IsServer) (eq hugo.Environment "development") }}
+{{ if or (hugo.IsServer) (eq hugo.Environment "development") }}
{{ else }}
{{ $js := $js | resources.Minify | resources.Fingerprint }}