Skip to content

Commit

Permalink
Handle missing slug when generating feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
allanlasser committed Nov 14, 2024
1 parent 18d87cc commit da12749
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/generateFeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default async function generateFeed() {
posts.map(
async (post) =>
new Promise<void>(async (resolve) => {
const id = `${siteURL}/posts/${post.slug.current}`;
const id = `${siteURL}/posts/${post.slug?.current}`;
const url = post.source?.url ? post.source.url : id;
const isExternal = id !== url;
const content = generatePostContent(post, id);
Expand Down

0 comments on commit da12749

Please sign in to comment.