Skip to content

Commit

Permalink
Merge pull request #37 from ItzNotABug/fix-36-null-url-decoding-crash
Browse files Browse the repository at this point in the history
Fix #36.
  • Loading branch information
ItzNotABug authored Mar 18, 2024
2 parents 3f43079 + e30f24f commit b91ed84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ghosler",
"description": "Send newsletter emails to your members, using your own email credentials!",
"version": "0.92",
"version": "0.93",
"private": true,
"main": "app.js",
"type": "module",
Expand Down
5 changes: 2 additions & 3 deletions utils/newsletter.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,8 @@ export default class Newsletter {
renderingData.newsletter.unsubscribeLink,
renderingData.newsletter.feedbackLikeLink,
renderingData.newsletter.feedbackDislikeLink,
// featuredImage can be null, so we should to filter them.
...renderingData.post.latestPosts.filter(post => post.featuredImage).map(post => post.featuredImage)
].forEach(internalLinks => urlsToExclude.push(he.decode(internalLinks)));
...renderingData.post.latestPosts.map(post => post.featuredImage)
].forEach(linkToTrack => linkToTrack && urlsToExclude.push(he.decode(linkToTrack)));

const trackedLinks = new Set();
const $ = cheerio.load(renderedPostData);
Expand Down

0 comments on commit b91ed84

Please sign in to comment.