diff --git a/web-src/src/components/SettingsIntfield.vue b/web-src/src/components/SettingsIntfield.vue index c3941e5d..ff8ee02c 100644 --- a/web-src/src/components/SettingsIntfield.vue +++ b/web-src/src/components/SettingsIntfield.vue @@ -13,7 +13,7 @@ 0) { window.clearTimeout(this.timerId) this.timerId = -1 } this.statusUpdate = '' - const newValue = this.$refs.setting.value - if (newValue !== this.value) { - this.timerId = window.setTimeout(this.update_setting, this.timerDelay) - } + this.timerId = window.setTimeout(this.update_setting, this.timerDelay) }, update_setting() { this.timerId = -1 - const newValue = this.$refs.setting.value - if (newValue === this.value) { + const newValue = parseInt(this.$refs.setting.value, 10) + if (isNaN(newValue) || newValue === this.value) { this.statusUpdate = '' return } const option = { category: this.category.name, name: this.option_name, - value: parseInt(newValue, 10) + value: newValue } webapi .settings_update(this.category.name, option)