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 f3d248f commit 3653b03
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/system/footer/shared_2.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,25 +237,20 @@ const compareSystems = function (
}

const propEntryA = propEntriesA[index]
const propOrderA = propEntryA.propOrder
const propOrderB = propEntryB.propOrder

if (propOrderA > propOrderB) {
if (propEntryA.propOrder > propEntryB.propOrder) {
return 1
}

if (propOrderA < propOrderB) {
if (propEntryA.propOrder < propEntryB.propOrder) {
return -1
}

const valueA = propEntryA.propValue
const valueB = propEntryB.propValue

if (valueA > valueB) {
if (propEntryA.propValue > propEntryB.propValue) {
return 1
}

if (valueA < valueB) {
if (propEntryA.propValue < propEntryB.propValue) {
return -1
}
}
Expand Down

0 comments on commit 3653b03

Please sign in to comment.