Skip to content

Commit 6e8cfba

Browse files
Fix workflow dirs sorting bug in GScan (#2349)
Workflow dirs/parts were being sorted in between workflows beginning with "o" and "p". Partially reverts 5371b06
2 parents 46504f8 + 4e5112c commit 6e8cfba

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

changes.d/2349.fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed workflow sorting bug in the sidebar.

src/store/workflows.module.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ function addChild (parentNode, childNode) {
144144
}
145145

146146
// insert the child preserving sort order
147-
const iteratee = (n) => `${n.type}-${n.name}` // (this makes families sort before tasks in the tree)
147+
const iteratee = ['task', 'family'].includes(childNode.type)
148+
? (n) => `${n.type}-${n.name}` // (this makes families sort before tasks in the tree)
149+
: (n) => n.name
148150
const reverse = ['cycle', 'job'].includes(childNode.type)
149151
const index = sortedIndexBy(
150152
parentNode[key],

0 commit comments

Comments
 (0)