Skip to content

Commit

Permalink
core(stack-packs): sort packs in order we defined them (#15039)
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed May 3, 2023
1 parent 34b138d commit 4c23ad8
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 143 deletions.
6 changes: 5 additions & 1 deletion core/lib/stack-packs.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ function getStackPacks(pageStacks) {
});
}

return packs;
return packs.sort((a, b) => {
const aVal = stackPacksToInclude.findIndex(p => p.packId === a.id);
const bVal = stackPacksToInclude.findIndex(p => p.packId === b.id);
return aVal - bVal;
});
}

export {
Expand Down
Loading

0 comments on commit 4c23ad8

Please sign in to comment.