From 0f5a895d5d34f01987784d2c09be6850e4ee2990 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Mon, 8 Jan 2024 23:28:26 -0700 Subject: [PATCH] Don't include the full filepath in the icon name --- module/handlebars.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/handlebars.mjs b/module/handlebars.mjs index 0878884..e91e5ad 100644 --- a/module/handlebars.mjs +++ b/module/handlebars.mjs @@ -79,7 +79,7 @@ export async function preloadIcons() { const parsedIcons = {}; for (const icon of icons) { - const iconName = icon.slice(0, -4); + const iconName = icon.split(`/`).slice(-1)[0].slice(0, -4); if (icon.endsWith(`.svg`)) { try { const response = await fetchWithTimeout(`${pathPrefix}${icon}`);