Skip to content

Commit 587de56

Browse files
committed
👔 lint
1 parent 8d024b4 commit 587de56

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

dash-renderer/src/actions/index.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -531,17 +531,18 @@ function inputsToDict(inputs_list) {
531531
// returns an Object (map):
532532
// keys of the form `id.property` or `{"id": 0}.property`
533533
// values contain the property value
534-
let inputs = {};
534+
const inputs = {};
535535
for (let i = 0; i < inputs_list.length; i++) {
536536
if (Array.isArray(inputs_list[i])) {
537-
let inputsi = inputs_list[i];
537+
const inputsi = inputs_list[i];
538538
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+
}`;
540542
inputs[id_str] = inputsi[ii].value;
541543
}
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}`;
545546
inputs[id_str] = inputs_list[i].value;
546547
}
547548
}
@@ -568,14 +569,14 @@ function handleClientside(clientside_function, payload) {
568569

569570
try {
570571
// setup callback context
571-
let input_dict = inputsToDict(inputs);
572+
const input_dict = inputsToDict(inputs);
572573
dc.callback_context = {};
573574
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 {
577577
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+
);
579580
}
580581
dc.callback_context.inputs_list = input_dict;
581582
dc.callback_context.inputs = inputs;

0 commit comments

Comments
 (0)