nodebb-plugin-link-preview 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library.js +1 -0
- package/package.json +1 -1
package/library.js
CHANGED
|
@@ -308,6 +308,7 @@ plugin.onPost = async ({ post }) => {
|
|
|
308
308
|
const urls = lines.filter(line => isURL(line));
|
|
309
309
|
|
|
310
310
|
let previews = await Promise.all(urls.map(async url => await preview(url)));
|
|
311
|
+
previews = previews.filter(Boolean);
|
|
311
312
|
previews = previews.map(({ url, contentType: mediaType }) => ({
|
|
312
313
|
type: 'inline',
|
|
313
314
|
url,
|