mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-27 09:54:51 +00:00
refactor: remove optional chaining as modules is always returned as an array
This commit is contained in:
parent
1ccb37e031
commit
95e557b133
@ -39,8 +39,8 @@ const buildOwnersFrom = (
|
||||
})
|
||||
})
|
||||
|
||||
const buildModulesLinkedList = (modules: Array<string>, nextModule: string): Array<ModulePair> | null => {
|
||||
if (modules?.length) {
|
||||
const buildModulesLinkedList = (modules: string[], nextModule: string): Array<ModulePair> | null => {
|
||||
if (modules.length) {
|
||||
return modules.map((moduleAddress, index, modules) => {
|
||||
const prevModule = modules[index + 1]
|
||||
return [moduleAddress, prevModule !== undefined ? prevModule : nextModule]
|
||||
|
Loading…
x
Reference in New Issue
Block a user