File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ export default async function AboutPage({
11
11
} ) {
12
12
const pageid = process . env . ABOUT_PAGE ;
13
13
14
+ // Check if pageid is defined before using it
15
+ if ( ! pageid ) {
16
+ // Handle the case when pageid is undefined
17
+ console . error ( "ABOUT_PAGE is not defined" ) ;
18
+ return null ; // or return an error message or redirect, depending on your logic
19
+ }
20
+
14
21
// Fetching blockMap
15
22
const response = await fetch ( `https://notion-api.splitbee.io/v1/page/${ pageid } ` , {
16
23
next : { revalidate : 60 } ,
@@ -19,6 +26,7 @@ export default async function AboutPage({
19
26
20
27
// Fetching pageProperties
21
28
const pageProperties = await notion . pages . retrieve ( { page_id : pageid } ) ;
29
+
22
30
const postDetails = convertToPost ( pageProperties ) ;
23
31
24
32
return (
You can’t perform that action at this time.
0 commit comments