File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ impl FormInputField {
135135 let int_default = value. hasDefault . then_some ( value. intDefault ) ;
136136 let address_default = value. hasDefault . then_some ( value. addressDefault ) ;
137137 let index_default = value. hasDefault . then_some ( value. indexDefault ) ;
138- let bool_default = value . hasDefault . then_some ( value . intResult != 0 ) ;
138+ let bool_default = int_default . map ( |i| i != 0 ) ;
139139 let extension = raw_to_string ( value. ext ) ;
140140 let current_address = value. currentAddress ;
141141 let string_result = raw_to_string ( value. stringResult ) ;
@@ -355,6 +355,7 @@ impl FormInputField {
355355 pub fn try_default_int ( & self ) -> Option < i64 > {
356356 match self {
357357 FormInputField :: Integer { default, .. } => * default,
358+ FormInputField :: Checkbox { default, .. } => default. map ( |b| b as i64 ) ,
358359 _ => None ,
359360 }
360361 }
@@ -391,6 +392,7 @@ impl FormInputField {
391392 pub fn try_value_int ( & self ) -> Option < i64 > {
392393 match self {
393394 FormInputField :: Integer { value, .. } => Some ( * value) ,
395+ FormInputField :: Checkbox { value, .. } => Some ( * value as i64 ) ,
394396 _ => None ,
395397 }
396398 }
You can’t perform that action at this time.
0 commit comments