From 7992ce0035a4d21ed5da875052d44e82f4df93c1 Mon Sep 17 00:00:00 2001
From: James Panther <4462786+jpanther@users.noreply.github.com>
Date: Wed, 19 Jan 2022 11:52:49 +1100
Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=85=20Catch=20when=20no=20JS=20require?=
=?UTF-8?q?d=20in=20bundle?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
layouts/partials/head.html | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 046faf7d..6d1eee96 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -56,8 +56,10 @@
{{ $jsDark := resources.Get "js/dark.js" }}
{{ $assets.Add "js" (slice $jsDark) }}
{{ end }}
- {{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
-
+ {{ if $assets.Get "js" }}
+ {{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
+
+ {{ end }}
{{/* Icons */}}
{{ if templates.Exists "partials/favicons.html" }}
{{ partialCached "favicons.html" .Site }}