From 5296e19e8655a4c7766583d7693c32f8ea4ff115 Mon Sep 17 00:00:00 2001 From: Andrio Celos Date: Fri, 1 Mar 2024 11:17:49 +1100 Subject: [PATCH] Fix an error exporting custom cards without an image --- TableturfBattleClient/src/Pages/DeckListPage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TableturfBattleClient/src/Pages/DeckListPage.ts b/TableturfBattleClient/src/Pages/DeckListPage.ts index 15f88a6..f492b9e 100644 --- a/TableturfBattleClient/src/Pages/DeckListPage.ts +++ b/TableturfBattleClient/src/Pages/DeckListPage.ts @@ -440,7 +440,7 @@ function deckExportJsonReplacer(key: string, value: any) { return value ?? undefined; // Omit null values. case 'imageUrl': // Custom cards store image data here, so include it if it is a data URI. - return ( value).startsWith('data:') ? value : undefined; + return value && ( value).startsWith('data:') ? value : undefined; default: return value; }