From 5f0050849e9c9f8edcdd307006de15e6ba1990f4 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 25 Sep 2023 15:05:14 +0100 Subject: [PATCH] Fixing issue detected by test. --- packages/server/src/api/routes/public/middleware/mapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/api/routes/public/middleware/mapper.ts b/packages/server/src/api/routes/public/middleware/mapper.ts index f3c994bb9b..03feb6cc5c 100644 --- a/packages/server/src/api/routes/public/middleware/mapper.ts +++ b/packages/server/src/api/routes/public/middleware/mapper.ts @@ -19,7 +19,7 @@ function isArrayResponse(ctx: Ctx) { } function noResponse(ctx: Ctx) { - return Object.keys(ctx.body).length === 0 + return !Array.isArray(ctx.body) && Object.keys(ctx.body).length === 0 } function processApplications(ctx: Ctx) {