Skip to content

Commit

Permalink
fix: fix panic when no page is found.
Browse files Browse the repository at this point in the history
  • Loading branch information
fky2015 committed Feb 13, 2023
1 parent e02f433 commit 9aa7575
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resolve-notion-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export async function resolveNotionPage(domain: string, rawPageId?: string) {
// handle mapping of user-friendly canonical page paths to Notion page IDs
// e.g., /developer-x-entrepreneur versus /71201624b204481f862630ea25ce62fe
const siteMap = await getSiteMap()
pageId = siteMap?.canonicalPageMap[rawPageId].pageId
pageId = siteMap?.canonicalPageMap[rawPageId]?.pageId

if (pageId) {
// TODO: we're not re-using the page recordMap from siteMaps because it is
Expand Down

0 comments on commit 9aa7575

Please sign in to comment.