@tryghost/mg-substack 0.7.1 → 0.7.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/lib/process.js +9 -1
- package/package.json +2 -2
package/lib/process.js
CHANGED
|
@@ -416,7 +416,15 @@ const processContent = (post, siteUrl, options) => {
|
|
|
416
416
|
|
|
417
417
|
$html('.digest-post-embed').each((i, el) => {
|
|
418
418
|
const attrsRaw = $(el).attr('data-attrs');
|
|
419
|
-
|
|
419
|
+
|
|
420
|
+
let attrs;
|
|
421
|
+
|
|
422
|
+
// Return early if JSON is invalid
|
|
423
|
+
try {
|
|
424
|
+
attrs = JSON.parse(attrsRaw);
|
|
425
|
+
} catch (error) {
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
420
428
|
|
|
421
429
|
const postUrl = attrs.canonical_url;
|
|
422
430
|
const postTitle = attrs.title;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/mg-substack",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-substack",
|
|
5
5
|
"author": "Ghost Foundation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"simple-dom": "1.4.0",
|
|
38
38
|
"srcset": "5.0.1"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "1a065fa46d2a5a0a65e51716d154d5577693e792"
|
|
41
41
|
}
|