cardSchema: take innerHTML instead, force type to 'link' if html is empty
This commit is contained in:
@ -76,7 +76,11 @@ const cardSchema = z.object({
|
||||
}
|
||||
});
|
||||
|
||||
card.html = html.outerHTML;
|
||||
card.html = html.innerHTML;
|
||||
|
||||
if (!card.html) {
|
||||
card.type = 'link';
|
||||
}
|
||||
|
||||
return card;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user