Skip to content

Commit

Permalink
fix(temperature): hide multiple same temp presets in dropdown (#1724)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou authored Dec 31, 2023
1 parent 74ff01b commit d8ebc86
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/store/gui/presets/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ export const getters: GetterTree<GuiPresetsState, any> = {
const preset = state.presets[id]

if (
payload.name in preset.values &&
preset.values[payload.name].bool &&
output.findIndex((entry: preset) => entry.value === preset.values[payload.name].value) === -1
preset.values[payload.name]?.bool &&
output.findIndex(
(entry: preset) => entry.value === parseFloat(preset.values[payload.name]?.value?.toString() ?? '0')
) === -1
) {
output.push({
// @ts-ignore
Expand Down

0 comments on commit d8ebc86

Please sign in to comment.