Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Dec 26, 2021
1 parent f722725 commit ae40458
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/system/footer/shared_2.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,9 @@ const appendValues = function (dimensionsArray) {
}

const addTopSystem = function (propGroups) {
if (propGroups.some(isTopSystem)) {
return propGroups
}

const topPropGroup = { propEntriesArray: [], dimensionsArray: [] }
return [topPropGroup, ...propGroups]
return propGroups.some(isTopSystem)
? propGroups
: [{ propEntriesArray: [], dimensionsArray: [] }, ...propGroups]
}

const isTopSystem = function ({ dimensionsArray }) {
Expand Down

0 comments on commit ae40458

Please sign in to comment.