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.
Files changed (2) hide show
  1. package/library.js +1 -0
  2. 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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-link-preview",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "A starter kit for quickly creating NodeBB plugins",
5
5
  "main": "library.js",
6
6
  "repository": {