Skip to content

Commit 2c6decf

Browse files
committed
refactor: use readable variable name
1 parent a380fcc commit 2c6decf

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

app/pages/package/[[org]]/[name]/versions.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ const latestTagRow = computed(() => tagRows.value.find(r => r.tags.includes('lat
7171
const otherTagRows = computed(() =>
7272
tagRows.value
7373
.filter(r => !r.tags.includes('latest'))
74-
.sort((a, b) => {
75-
const pa = getTagPriority(a.primaryTag)
76-
const pb = getTagPriority(b.primaryTag)
77-
if (pa !== pb) return pa - pb
78-
const ta = versionTimes.value[a.version] ?? ''
79-
const tb = versionTimes.value[b.version] ?? ''
80-
return tb.localeCompare(ta)
74+
.sort((rowA, rowB) => {
75+
const priorityA = getTagPriority(rowA.primaryTag)
76+
const priorityB = getTagPriority(rowB.primaryTag)
77+
if (priorityA !== priorityB) return priorityA - priorityB
78+
const timeA = versionTimes.value[rowA.version] ?? ''
79+
const timeB = versionTimes.value[rowB.version] ?? ''
80+
return timeB.localeCompare(timeA)
8181
}),
8282
)
8383

0 commit comments

Comments
 (0)