From 7ddfdabcb0c20e703965c15d1f5c9f66ea39cdce Mon Sep 17 00:00:00 2001 From: Alexandre Bodin Date: Thu, 28 May 2020 18:32:23 +0200 Subject: [PATCH] Fix 204 bugs Signed-off-by: Alexandre Bodin --- packages/strapi/lib/middlewares/router/utils/routerChecker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/strapi/lib/middlewares/router/utils/routerChecker.js b/packages/strapi/lib/middlewares/router/utils/routerChecker.js index 500b904ebc..0a4ac595b6 100644 --- a/packages/strapi/lib/middlewares/router/utils/routerChecker.js +++ b/packages/strapi/lib/middlewares/router/utils/routerChecker.js @@ -69,7 +69,7 @@ module.exports = strapi => // Set body. const values = await next(); - if (!ctx.body) { + if (_.isNil(ctx.body) && !_.isNil(values)) { ctx.body = values; } });