From dbce0d2425f60f8804632fddd8b0718380ee094c Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sun, 5 Jun 2022 22:54:03 +0200 Subject: [PATCH] fix: sort of toolchange macros Signed-off-by: Stefan Dej --- src/store/printer/getters.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/store/printer/getters.ts b/src/store/printer/getters.ts index 943ccc6cc..5654ae60d 100644 --- a/src/store/printer/getters.ts +++ b/src/store/printer/getters.ts @@ -890,7 +890,12 @@ export const getters: GetterTree = { }) ) - 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) => {