From 5bb8a6d6d5693bae2261f8fa52d2ebb17c59e589 Mon Sep 17 00:00:00 2001 From: Jacob Fletcher Date: Wed, 28 Oct 2020 10:33:21 -0400 Subject: [PATCH] migrates away from optional chaining in express/responses/formatError --- src/express/responses/formatError.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/express/responses/formatError.js b/src/express/responses/formatError.js index 9ca60ef5b5..24850044bd 100644 --- a/src/express/responses/formatError.js +++ b/src/express/responses/formatError.js @@ -1,6 +1,6 @@ const formatErrorResponse = (incoming) => { if (incoming) { - if (incoming?.data?.length > 0) { + if (incoming && incoming.data && incoming.data.length > 0) { return { errors: [{ name: incoming.name,