Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Feb 27, 2025
1 parent a83ec1d commit b60d8e8
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -585,12 +585,12 @@ function sortAfterInheritanceOrderGlobal(
const ret = lowerFirst((plusFile: PlusFile) => plusFile.locationId.split('/').length)(plusFile1, plusFile2)
if (ret !== 0) return ret
}
// Group after `locationId`
if (plusFile1.locationId !== plusFile2.locationId) {
// Same as `sort()` in `['some', 'string', 'array'].sort()`
return plusFile1.locationId > plusFile2.locationId ? 1 : -1
}
if (configName) {
assert(plusFile1.locationId === plusFile2.locationId)
const ret = sortPlusFilesSameLocationId(plusFile1, plusFile2, configName)
if (ret !== 0) return ret
}
Expand Down Expand Up @@ -627,7 +627,6 @@ function sortPlusFilesSameLocationId(plusFile1: PlusFile, plusFile2: PlusFile, c
}

// Config set by +{configName}.js (highest precedence)

// No need to make it deterministic: the overall order is arleady deterministic, see sortMakeDeterministic() at getPlusFilesAll()
return 0
}
Expand Down

0 comments on commit b60d8e8

Please sign in to comment.