cardSchema: take innerHTML instead, force type to 'link' if html is empty
This commit is contained in:
parent
d53c1c2227
commit
8633eca37d
1 changed files with 5 additions and 1 deletions
|
@ -76,7 +76,11 @@ const cardSchema = z.object({
|
|||
}
|
||||
});
|
||||
|
||||
card.html = html.outerHTML;
|
||||
card.html = html.innerHTML;
|
||||
|
||||
if (!card.html) {
|
||||
card.type = 'link';
|
||||
}
|
||||
|
||||
return card;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue