From 95e557b13322b2893ac0c9cb5ea301f1d190e1f3 Mon Sep 17 00:00:00 2001 From: fernandomg Date: Fri, 17 Jul 2020 11:10:27 -0300 Subject: [PATCH] refactor: remove optional chaining as modules is always returned as an array --- src/routes/safe/store/actions/fetchSafe.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/safe/store/actions/fetchSafe.ts b/src/routes/safe/store/actions/fetchSafe.ts index 2d65639e..b73f5b73 100644 --- a/src/routes/safe/store/actions/fetchSafe.ts +++ b/src/routes/safe/store/actions/fetchSafe.ts @@ -39,8 +39,8 @@ const buildOwnersFrom = ( }) }) -const buildModulesLinkedList = (modules: Array, nextModule: string): Array | null => { - if (modules?.length) { +const buildModulesLinkedList = (modules: string[], nextModule: string): Array | null => { + if (modules.length) { return modules.map((moduleAddress, index, modules) => { const prevModule = modules[index + 1] return [moduleAddress, prevModule !== undefined ? prevModule : nextModule]