cardSchema: take innerHTML instead, force type to 'link' if html is empty

This commit is contained in:
Alex Gleason
2024-03-14 19:09:00 -05:00
parent d53c1c2227
commit 8633eca37d

View File

@ -76,7 +76,11 @@ const cardSchema = z.object({
}
});
card.html = html.outerHTML;
card.html = html.innerHTML;
if (!card.html) {
card.type = 'link';
}
return card;
});