We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1135b1 commit 50df7c4Copy full SHA for 50df7c4
src/bignum_input.vue
@@ -66,8 +66,11 @@
66
},
67
watch: {
68
val(val){
69
+ if(!val){
70
+ this.$emit('change', new BN(0));
71
+ return
72
+ }
73
- //
74
try{
75
let splitVal = val.toString().split('.')
76
let wholeVal = splitVal[0]
@@ -88,11 +91,6 @@
88
91
return
89
92
}
90
93
- if(!val){
- this.$emit('change', new BN(0));
- return
94
- }
95
-
96
let valBn = this.stringToBN(val)
97
this.$emit('change', valBn);
98
@@ -116,7 +114,7 @@
116
114
117
115
118
clear(){
119
- this.val = 0
+ this.val = undefined
120
121
onChange(){
122
// If number is above max amount, correct it
0 commit comments