From 75ceab0cf13c420eb543130212b879a05716e35a Mon Sep 17 00:00:00 2001 From: "Thomas \"ajnart\" Camlong" Date: Fri, 22 Jul 2022 13:13:41 +0200 Subject: [PATCH] :bug: Fix fetching images in MatchIcon --- src/components/AppShelf/AddAppShelfItem.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/AppShelf/AddAppShelfItem.tsx b/src/components/AppShelf/AddAppShelfItem.tsx index 20d759005..d6b3b9bc3 100644 --- a/src/components/AppShelf/AddAppShelfItem.tsx +++ b/src/components/AppShelf/AddAppShelfItem.tsx @@ -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( `https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/${name .replace(/\s+/g, '-')