From 2f78f249e19d7852a54574e2d11719ad0b8b229e Mon Sep 17 00:00:00 2001 From: Joonas Tiala Date: Thu, 31 Aug 2023 19:23:33 +0300 Subject: [PATCH] fix: regression introduced in typescript conversion --- src/scrapers/pages.ts | 2 +- src/scrapers/posts.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scrapers/pages.ts b/src/scrapers/pages.ts index 9834371..632a65f 100644 --- a/src/scrapers/pages.ts +++ b/src/scrapers/pages.ts @@ -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}`; diff --git a/src/scrapers/posts.ts b/src/scrapers/posts.ts index 938476b..ba99c80 100644 --- a/src/scrapers/posts.ts +++ b/src/scrapers/posts.ts @@ -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}`;