Skip to content

Commit 6468b7a

Browse files
🤶
1 parent b363b67 commit 6468b7a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/full/pages/[pageId].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const getStaticProps = async (context: any) => {
1616
const recordMap = await notion.getPage(pageId)
1717

1818
// NOTE: this isn't necessary; trying to reduce my vercel bill
19-
if (recordMap.block[0]!.value.space_id !== rootNotionSpaceId) {
19+
if (recordMap.block[0]?.value?.space_id !== rootNotionSpaceId) {
2020
return {
2121
notFound: true
2222
}

examples/minimal/pages/[pageId].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const getStaticProps = async (context: any) => {
99
const recordMap = await notion.getPage(pageId)
1010

1111
// NOTE: this isn't necessary; trying to reduce my vercel bill
12-
if (recordMap.block[0]!.value.space_id !== rootNotionSpaceId) {
12+
if (recordMap.block[0]?.value?.space_id !== rootNotionSpaceId) {
1313
return {
1414
notFound: true
1515
}

0 commit comments

Comments
 (0)