Skip to content

Commit

Permalink
Add fallback empty string if no HTML is supplied for Substack post
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulAdamDavis committed May 15, 2024
1 parent 9ccf2a7 commit d2de6c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mg-substack/lib/mapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default async (input, options) => {
// Inline the HTML we have with the CSV data
input.meta.map((post) => {
const thisPostHTML = input.posts.find(item => item.name.includes(post.post_id));
post.html = thisPostHTML.html;
post.html = thisPostHTML?.html ?? '';
return post;
});

Expand Down

0 comments on commit d2de6c7

Please sign in to comment.