@tryghost/mg-substack 0.8.6 → 0.8.7

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 +4 -0
  2. package/package.json +2 -3
package/lib/process.js CHANGED
@@ -630,6 +630,10 @@ const processContent = (post, siteUrl, options) => {
630
630
  let href = $(anchor).attr('href');
631
631
  let linkRegex = new RegExp(`^(${siteUrl})?(/subscribe)(.*)`, 'gi');
632
632
 
633
+ if (!href) {
634
+ return;
635
+ }
636
+
633
637
  let matches = href.replace(linkRegex, '$2');
634
638
 
635
639
  if (matches === '/subscribe') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/mg-substack",
3
- "version": "0.8.6",
3
+ "version": "0.8.7",
4
4
  "repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-substack",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -36,6 +36,5 @@
36
36
  "lodash": "4.17.21",
37
37
  "simple-dom": "1.4.0",
38
38
  "srcset": "5.0.2"
39
- },
40
- "gitHead": "93b72e5f4374d9f097876b71e78fdc920af364ff"
39
+ }
41
40
  }