From 5bcd43bb48ff59536731d1aad5bdf6ed490f4c71 Mon Sep 17 00:00:00 2001 From: samfun123 Date: Sun, 4 Feb 2018 11:32:03 -0500 Subject: [PATCH] Fixed two bugs in the Number type --- client/src/ui/components/bd/pluginsetting/Number.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/ui/components/bd/pluginsetting/Number.vue b/client/src/ui/components/bd/pluginsetting/Number.vue index d355e29b..ccde51a2 100644 --- a/client/src/ui/components/bd/pluginsetting/Number.vue +++ b/client/src/ui/components/bd/pluginsetting/Number.vue @@ -13,7 +13,7 @@

{{setting.text}}

- +
@@ -28,7 +28,10 @@ props: ['setting', 'change'], methods: { input(e) { - this.change(this.setting.id, parseFloat(e.target.value)); + let number = parseFloat(e.target.value) + if (Number.isNaN(number)) return; + + this.change(this.setting.id, number); }, changeBy(positive) { let step = this.setting.step == undefined ? 1 : this.settings.step;