Skip to content

Commit

Permalink
fix: regression introduced in typescript conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
jtiala committed Aug 31, 2023
1 parent d0f4f12 commit 2f78f24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/scrapers/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export async function scrapePages({
}

for (const page of pages) {
if (typeof page === "object" && "post" in page && "id" in page) {
if (typeof page === "object" && "id" in page && "slug" in page) {
const pageIdentifier = `${page.id}-${page.slug}`;
const pageDir = `${pagesDir}/${pageIdentifier}`;

Expand Down
2 changes: 1 addition & 1 deletion src/scrapers/posts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export async function scrapePosts({
}

for (const post of posts) {
if (typeof post === "object" && "post" in post && "id" in post) {
if (typeof post === "object" && "id" in post && "slug" in post) {
const postIdentifier = `${post.id}-${post.slug}`;
const postDir = `${postsDir}/${postIdentifier}`;

Expand Down

0 comments on commit 2f78f24

Please sign in to comment.