From 8a8683e3afe6e9b19c24873353a46366b68e21b9 Mon Sep 17 00:00:00 2001 From: Oliver Butler Date: Mon, 14 Feb 2022 23:44:06 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Fix=20invisible=20TS=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/xeo-scrum/pages/api/backlog/[id]/members/index.ts | 4 ++-- .../xeo-scrum/pages/connections/backlog/notion/[id]/index.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/xeo-scrum/pages/api/backlog/[id]/members/index.ts b/apps/xeo-scrum/pages/api/backlog/[id]/members/index.ts index 53d3d5c..05ce8aa 100644 --- a/apps/xeo-scrum/pages/api/backlog/[id]/members/index.ts +++ b/apps/xeo-scrum/pages/api/backlog/[id]/members/index.ts @@ -68,8 +68,8 @@ export default async function backlogMembers( if (req.method === 'PUT') { const { body, error } = parseAPIRequest(req, schema); - if (error) { - return res.status(400).json({ message: error.message }); + if (error || !body) { + return res.status(400).json({ message: error?.message }); } try { diff --git a/apps/xeo-scrum/pages/connections/backlog/notion/[id]/index.tsx b/apps/xeo-scrum/pages/connections/backlog/notion/[id]/index.tsx index f8e90c3..cb968ff 100644 --- a/apps/xeo-scrum/pages/connections/backlog/notion/[id]/index.tsx +++ b/apps/xeo-scrum/pages/connections/backlog/notion/[id]/index.tsx @@ -20,7 +20,7 @@ export function Index() { return ; } - return ; + return data ? : null; } export default Index;