Skip to content

Commit 8426c05

Browse files
committed
fix: remove invalid previews prior to parsing for attachments
1 parent 02b9074 commit 8426c05

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library.js

+1
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ plugin.onPost = async ({ post }) => {
308308
const urls = lines.filter(line => isURL(line));
309309

310310
let previews = await Promise.all(urls.map(async url => await preview(url)));
311+
previews = previews.filter(Boolean);
311312
previews = previews.map(({ url, contentType: mediaType }) => ({
312313
type: 'inline',
313314
url,

0 commit comments

Comments
 (0)