nodebb-plugin-link-preview 2.1.2 → 2.1.3

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
@@ -144,7 +144,7 @@ async function process(content, { type, pid, tid, attachments }) {
144
144
  }
145
145
 
146
146
  // ActivityPub attachments
147
- if (attachment.hasOwnProperty('mediaType')) {
147
+ if (attachment.hasOwnProperty('mediaType') && attachment.mediaType) {
148
148
  switch (true) {
149
149
  case attachment.mediaType.startsWith('video/'): {
150
150
  cache.set(`link-preview:${url}`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-link-preview",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "A starter kit for quickly creating NodeBB plugins",
5
5
  "main": "library.js",
6
6
  "repository": {