Skip to content

Commit 70dd0e0

Browse files
wasikusspedrolamas
andauthored
fix: numeric sorting of tool macros in spoolman card (#1763)
Signed-off-by: Krzysztof Wasilewski <wasikuss@gmail.com> Co-authored-by: Pedro Lamas <pedrolamas@gmail.com>
1 parent d74c478 commit 70dd0e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/widgets/spoolman/SpoolmanCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ export default class SpoolmanCard extends Mixins(StateMixin) {
255255
256256
return macros
257257
.filter((macro): macro is MacroWithSpoolId => macro.variables != null && 'spool_id' in macro.variables)
258-
.sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase()))
258+
.sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true }))
259259
}
260260
261261
get remainingFilamentUnit (): SpoolmanRemainingFilamentUnit {

0 commit comments

Comments
 (0)