Skip to content

Commit

Permalink
chore: logic update
Browse files Browse the repository at this point in the history
  • Loading branch information
mbifulco committed Dec 21, 2024
1 parent 63b5926 commit 350408e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/external-references.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const getAllExternalReferences = async () => {
)) as Article[];

// filter out articles that don't have a slug
articles = articles.filter((article) => article.frontmatter?.slug);
articles = articles?.filter((article) => article.frontmatter?.slug);

return articles;
};
Expand Down
3 changes: 1 addition & 2 deletions src/lib/newsletters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ export const getAllNewsletters = async () => {
)) as Newsletter[];

// filter out newsletters that don't have a slug
newsletters = newsletters.filter(
newsletters = newsletters?.filter(
(newsletter) => newsletter.frontmatter?.slug
);
console.log(`returned ${newsletters.length} newsletters`);

return newsletters;
};
Expand Down

0 comments on commit 350408e

Please sign in to comment.