Fix an error exporting custom cards without an image

This commit is contained in:
Andrio Celos 2024-03-01 11:17:49 +11:00
parent 242ff60a9d
commit 5296e19e86

View File

@ -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 (<string> value).startsWith('data:') ? value : undefined;
return value && (<string> value).startsWith('data:') ? value : undefined;
default:
return value;
}