diff --git a/bundles/org.openhab.ui/web/src/components/widgets/system/oh-stepper.vue b/bundles/org.openhab.ui/web/src/components/widgets/system/oh-stepper.vue index 370442f566..703d776411 100644 --- a/bundles/org.openhab.ui/web/src/components/widgets/system/oh-stepper.vue +++ b/bundles/org.openhab.ui/web/src/components/widgets/system/oh-stepper.vue @@ -48,7 +48,7 @@ export default { // uses the number of decimals in the step config to round the provided number if (!this.config.step) return value const nbDecimals = Number(this.config.step).toString().replace(',', '.').split('.')[1] - return parseFloat(Number(value)).toFixed(nbDecimals.length) + return parseFloat(Number(value)).toFixed(nbDecimals ? nbDecimals.length : 0) }, onChange (value) { const applyOffset = (value) => (typeof this.config.offset === 'number') ? Number(this.toStepFixed(value - this.config.offset)) : value