@@ -531,17 +531,18 @@ function inputsToDict(inputs_list) {
531
531
// returns an Object (map):
532
532
// keys of the form `id.property` or `{"id": 0}.property`
533
533
// values contain the property value
534
- let inputs = { } ;
534
+ const inputs = { } ;
535
535
for ( let i = 0 ; i < inputs_list . length ; i ++ ) {
536
536
if ( Array . isArray ( inputs_list [ i ] ) ) {
537
- let inputsi = inputs_list [ i ] ;
537
+ const inputsi = inputs_list [ i ] ;
538
538
for ( let ii = 0 ; ii < inputsi . length ; ii ++ ) {
539
- let id_str = `${ JSON . stringify ( inputsi [ ii ] . id ) } .${ inputsi [ ii ] . property } ` ;
539
+ const id_str = `${ JSON . stringify ( inputsi [ ii ] . id ) } .${
540
+ inputsi [ ii ] . property
541
+ } `;
540
542
inputs [ id_str ] = inputsi [ ii ] . value ;
541
543
}
542
- }
543
- else {
544
- let id_str = `${ inputs_list [ i ] . id } .${ inputs_list [ i ] . property } ` ;
544
+ } else {
545
+ const id_str = `${ inputs_list [ i ] . id } .${ inputs_list [ i ] . property } ` ;
545
546
inputs [ id_str ] = inputs_list [ i ] . value ;
546
547
}
547
548
}
@@ -568,14 +569,14 @@ function handleClientside(clientside_function, payload) {
568
569
569
570
try {
570
571
// setup callback context
571
- let input_dict = inputsToDict ( inputs ) ;
572
+ const input_dict = inputsToDict ( inputs ) ;
572
573
dc . callback_context = { } ;
573
574
if ( payload . changedPropIds . length === 0 ) {
574
- dc . callback_context . triggered = [ { 'prop_id' : '.' , 'value' : null } ] ;
575
- }
576
- else {
575
+ dc . callback_context . triggered = [ { prop_id : '.' , value : null } ] ;
576
+ } else {
577
577
dc . callback_context . triggered = payload . changedPropIds . map (
578
- prop_id => ( { 'prop_id' : prop_id , 'value' : input_dict [ prop_id ] } ) ) ;
578
+ prop_id => ( { prop_id : prop_id , value : input_dict [ prop_id ] } )
579
+ ) ;
579
580
}
580
581
dc . callback_context . inputs_list = input_dict ;
581
582
dc . callback_context . inputs = inputs ;
0 commit comments