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 5992070 commit 357ec1e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/system/footer/shared_2.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { isDeepStrictEqual } from 'util'

import mapObj from 'map-obj'
import omit from 'omit.js'
import sortOn from 'sort-on'

/* eslint-disable max-nested-callbacks, max-lines-per-function, complexity, max-lines, fp/no-loops, max-statements, max-depth, no-unreachable-loop */
const mainLogic = function (systems) {
Expand Down Expand Up @@ -209,10 +210,7 @@ const sortSystems = function (finalPropDimensions) {
const propOrder = PROP_ORDER.indexOf(propName)
return { propName, propValue, propOrder }
})
const propEntriesA = fullPropEntries.sort(
({ propOrder: propOrderA }, { propOrder: propOrderB }) =>
propOrderA > propOrderB ? 1 : -1,
)
const propEntriesA = sortOn(fullPropEntries, ['propOrder'])
return { hasNoDimensions, propEntries: propEntriesA, allDimensions }
})
.sort(
Expand Down

0 comments on commit 357ec1e

Please sign in to comment.