diff --git a/pages/[...slug].tsx b/pages/[...slug].tsx index e9a89894..0f77f33c 100644 --- a/pages/[...slug].tsx +++ b/pages/[...slug].tsx @@ -160,7 +160,7 @@ export const getStaticProps = async (ctx: any) => { } else { slug = '/' + array(ctx.params.slug).join('/') } - const page = await requestGet(createApiUrl(`/api/page?page=${slug}`), null) + const page = await requestGet(createApiUrl(`/api/page?page=${slug}`), null) if (!page) { throw new Error(`Not found: ${slug}`) } @@ -187,7 +187,7 @@ export const getStaticProps = async (ctx: any) => { } export const getStaticPaths = async () => { - const urls = await requestGet>(createApiUrl(`/api/pages/urls`), null) + const urls = await requestGet | null>(createApiUrl(`/api/pages/urls`), null) if (!urls) { return null }