From 5f442d117e0ccea3e4522bef179504f7776c67f0 Mon Sep 17 00:00:00 2001 From: qwertyforce <44163887+qwertyforce@users.noreply.github.com> Date: Fri, 25 Sep 2020 11:08:30 +0300 Subject: [PATCH] Update [id].tsx --- pages/image/[id].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/image/[id].tsx b/pages/image/[id].tsx index cd6cb2c..c2eb61a 100644 --- a/pages/image/[id].tsx +++ b/pages/image/[id].tsx @@ -105,7 +105,7 @@ export default function Image(props: any) { export const getStaticProps: GetStaticProps = async (context) => { - if (context.params) { + if (context.params.id) { const img = await db_ops.image_ops.find_image_by_id(parseInt((context.params.id as string))) if (img.length === 1) { const date = new Date(img[0].created_at)