Fixes the stepper from making phantom commands when a value is outside of the min/max (#1462)
Signed-off-by: Dan Cunningham <dan@digitaldan.com>pull/1470/head
parent
c9d912d8d8
commit
49a6000c02
|
@ -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
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue