Skip to content

Commit

Permalink
fix: sort of toolchange macros (#867)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou authored Jun 6, 2022
1 parent 1ed67b4 commit 3d3f292
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/store/printer/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,12 @@ export const getters: GetterTree<PrinterState, RootState> = {
})
)

return tools
return tools.sort((a, b) => {
const numberA = parseInt(a.name.slice(1))
const numberB = parseInt(b.name.slice(1))

return numberA - numberB
})
},

getKinematics: (state) => {
Expand Down

0 comments on commit 3d3f292

Please sign in to comment.