Skip to content

Commit

Permalink
Fixes the stepper from making phantom commands when a value is outsid…
Browse files Browse the repository at this point in the history
…e of the min/max (#1462)

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
  • Loading branch information
digitaldan authored Aug 9, 2022
1 parent c9d912d commit 49a6000
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export default {
computed: {
value () {
if (this.config.variable) return this.context.vars[this.config.variable]
const value = this.toStepFixed(parseFloat(this.context.store[this.config.item].state))
let value = this.toStepFixed(parseFloat(this.context.store[this.config.item].state))
if (this.config.min !== undefined) value = Math.max(value, this.config.min)
if (this.config.max !== undefined) value = Math.min(value, this.config.max)
return value
}
},
Expand Down

0 comments on commit 49a6000

Please sign in to comment.