Don't include the full filepath in the icon name

This commit is contained in:
Oliver-Akins 2024-01-08 23:28:26 -07:00
parent a43ec6f88f
commit 0f5a895d5d

View file

@ -79,7 +79,7 @@ export async function preloadIcons() {
const parsedIcons = {}; const parsedIcons = {};
for (const icon of icons) { 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`)) { if (icon.endsWith(`.svg`)) {
try { try {
const response = await fetchWithTimeout(`${pathPrefix}${icon}`); const response = await fetchWithTimeout(`${pathPrefix}${icon}`);