nodebb-plugin-link-preview 1.0.0 → 1.0.1

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 CHANGED
@@ -120,6 +120,10 @@ async function render(preview) {
120
120
 
121
121
  winston.verbose(`[link-preview] ${preview.url} (${preview.contentType || 'invalid'}, cache: hit)`);
122
122
 
123
+ if (!preview.contentType) {
124
+ return false;
125
+ }
126
+
123
127
  if (embedHtml && preview.contentType.startsWith('text/html')) {
124
128
  return await app.renderAsync('partials/link-preview/html', preview);
125
129
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-link-preview",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A starter kit for quickly creating NodeBB plugins",
5
5
  "main": "library.js",
6
6
  "repository": {