🐛 Fix fetching images in MatchIcon

This commit is contained in:
Thomas "ajnart" Camlong
2022-07-22 13:13:41 +02:00
parent 91181aed13
commit 75ceab0cf1

View File

@@ -54,7 +54,8 @@ export function AddItemShelfButton(props: any) {
); );
} }
function MatchIcon(name: string, form: any) { function MatchIcon(name: string | undefined, form: any) {
if (name === undefined || name === '') return null;
fetch( fetch(
`https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/${name `https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/${name
.replace(/\s+/g, '-') .replace(/\s+/g, '-')