diff --git a/apps/web/pages/documents/[id]/index.tsx b/apps/web/pages/documents/[id]/index.tsx index 08c05acfa..eaab64c24 100644 --- a/apps/web/pages/documents/[id]/index.tsx +++ b/apps/web/pages/documents/[id]/index.tsx @@ -120,22 +120,20 @@ export async function getServerSideProps(context: any) { context.req, context.res ); + + // todo optimize querys + // todo no intersection groups + + return { + props: { + document: document, + }, + }; } catch (error) { - if (!document) { - return { - notFound: true, - }; - } + return { + notFound: true, + }; } - - // todo optimize querys - // todo no intersection groups - - return { - props: { - document: document, - }, - }; } DocumentsDetailPage.getLayout = function getLayout(page: ReactElement) {