Skip to content

Commit

Permalink
fix: sort temperature sensors by type and name (#957)
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <[email protected]>
  • Loading branch information
pedrolamas authored Nov 21, 2022
1 parent 7f23626 commit 3f76335
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/store/printer/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ export const getters: GetterTree<PrinterState, RootState> = {
}
}
return pins
.sort((a, b) => a.type.localeCompare(b.type) || a.name.localeCompare(b.name))
},

/**
Expand Down Expand Up @@ -601,6 +602,7 @@ export const getters: GetterTree<PrinterState, RootState> = {
}, {} as Record<string, Sensor>)

return Object.values(sensors)
.sort((a, b) => a.type.localeCompare(b.type) || a.name.localeCompare(b.name))
},

/**
Expand Down

0 comments on commit 3f76335

Please sign in to comment.