From 8641f18d87171cb4f380a896103c62304f1e9726 Mon Sep 17 00:00:00 2001 From: James Doc Date: Sun, 12 May 2024 12:08:06 +0100 Subject: [PATCH] fix: SVG shortcut passing null to html --- src/_includes/blocks/header.njk | 2 +- src/_utils/11ty.shortcodes.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_includes/blocks/header.njk b/src/_includes/blocks/header.njk index 4cb0bba..2867ab5 100644 --- a/src/_includes/blocks/header.njk +++ b/src/_includes/blocks/header.njk @@ -6,7 +6,7 @@

The Globe Church

- {% svgIcon "tgcLogoFilled", "w-full" %} + {% svgIcon "tgcLogoFilled", "w-full", "The Globe Church" %}
diff --git a/src/_utils/11ty.shortcodes.js b/src/_utils/11ty.shortcodes.js index 1c14be2..01d6881 100644 --- a/src/_utils/11ty.shortcodes.js +++ b/src/_utils/11ty.shortcodes.js @@ -51,8 +51,8 @@ module.exports = { }); }, - svgIcon: function(name, cls = null, title = null) { - if (title !== null) { + svgIcon: function(name, cls = null, title = "") { + if (title !== "") { title = `${title}`; } return `${title}`;