@tryghost/mg-substack 0.3.9 → 0.3.11

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/lib/process.js +3 -2
  2. package/package.json +6 -6
package/lib/process.js CHANGED
@@ -71,12 +71,13 @@ const processContent = (post, siteUrl, options) => {
71
71
  const {substackPodcastURL, metaData} = post;
72
72
  const responseData = metaData?.responseData || {};
73
73
 
74
- let html = post.data.html;
74
+ let html = post.data?.html;
75
75
 
76
76
  // If there's no HTML, exit & return an empty string to avoid errors
77
77
  if (!html) {
78
78
  debug(`Post ${post.data.slug} has no HTML content`);
79
- return '';
79
+ post.data.html = '';
80
+ return post;
80
81
  }
81
82
 
82
83
  // As there is HTML, pass it to Cheerio inside a `<body>` tag so we have a global wrapper to target later on
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/mg-substack",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-substack",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -25,16 +25,16 @@
25
25
  "jest-extended": "3.2.4"
26
26
  },
27
27
  "dependencies": {
28
- "@tryghost/debug": "0.1.21",
29
- "@tryghost/errors": "1.2.20",
28
+ "@tryghost/debug": "0.1.23",
29
+ "@tryghost/errors": "1.2.22",
30
30
  "@tryghost/kg-default-cards": "6.0.5",
31
- "@tryghost/mg-fs-utils": "^0.12.7",
32
- "@tryghost/string": "0.2.2",
31
+ "@tryghost/mg-fs-utils": "^0.12.9",
32
+ "@tryghost/string": "0.2.4",
33
33
  "date-fns": "2.29.3",
34
34
  "html-entities": "2.3.3",
35
35
  "lodash": "4.17.21",
36
36
  "simple-dom": "1.4.0",
37
37
  "srcset": "5.0.0"
38
38
  },
39
- "gitHead": "3c11b69cfb075fed7b8544ef87ca68737c215878"
39
+ "gitHead": "4579dbfc60607e9721a3b0330de628ac41fd32d5"
40
40
  }