From 849097198b57424b3c8261f66ad500096bf2bd31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9B=90=EB=8D=94?= Date: Thu, 28 Jan 2021 10:12:59 +0900 Subject: [PATCH] fix: https://github.com/koreanbots/v2-testing/issues/37 --- pages/list/votes.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/list/votes.tsx b/pages/list/votes.tsx index d336b55..4eab39e 100644 --- a/pages/list/votes.tsx +++ b/pages/list/votes.tsx @@ -33,9 +33,11 @@ const Votes:NextPage = ({ data }) => { } export const getServerSideProps = async (ctx:Context) => { let data: BotList + console.log(ctx.query.page) if(!ctx.query.page) ctx.query.page = '1' const validate = await PageCount.validate(ctx.query.page).then(el => el).catch(() => null) - if(!validate) data = null + console.log(validate) + if(!validate || isNaN(Number(ctx.query.page))) data = null else data = await Query.get.list.votes.load(Number(ctx.query.page)) return { props: {