From 4963f4dc088c3321781d314552e8007e9d915d44 Mon Sep 17 00:00:00 2001 From: Michael C Date: Fri, 18 Jun 2021 15:33:14 -0400 Subject: [PATCH] style fixes --- src/routes/getSegmentInfo.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/routes/getSegmentInfo.ts b/src/routes/getSegmentInfo.ts index e9711ca..354102d 100644 --- a/src/routes/getSegmentInfo.ts +++ b/src/routes/getSegmentInfo.ts @@ -20,9 +20,7 @@ async function getSegmentsByUUID(UUIDs: SegmentUUID[]): Promise { const DBSegments: DBSegment[] = []; for (let UUID of UUIDs) { // if UUID is invalid, skip - if (!isValidSegmentUUID(UUID)) { - continue; - } + if (!isValidSegmentUUID(UUID)) continue; DBSegments.push(await getSegmentFromDBByUUID(UUID as SegmentUUID)); } return DBSegments; @@ -45,7 +43,7 @@ async function handleGetSegmentInfo(req: Request, res: Response) { } const DBSegments = await getSegmentsByUUID(UUIDs); // all uuids failed lookup - if (DBSegments.length === 0) { + if (!DBSegments?.length) { res.sendStatus(400); return false; }