diff --git a/layouts/partials/javascript.html b/layouts/partials/javascript.html
index 1491bc376..dca8df4ea 100644
--- a/layouts/partials/javascript.html
+++ b/layouts/partials/javascript.html
@@ -2,8 +2,7 @@
{{ $menu := resources.Get "js/menu.js" }}
{{ $prism := resources.Get "js/prism.js" }}
{{ $theme := resources.Get "js/theme.js" }}
-{{ $js := slice $main $menu $prism $theme | resources.Concat "js/bundle.js" | resources.Minify }}
-{{ $secureJS := $js | resources.Fingerprint "sha512" }}
+{{ $secureJS := slice $main $menu $prism $theme | resources.Concat "js/bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
{{- if .Site.GoogleAnalytics }}