Skip to content

Commit c35f0bc

Browse files
printfdebuggingeszkadev
authored andcommitted
formatting changes
Signed-off-by: Sahil Gautam <[email protected]> Change-Id: If0b757cff57aa86a76e1917a69ae2d871c816dc0
1 parent 103c217 commit c35f0bc

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

browser/src/control/jsdialog/Widget.Listbox.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@ JSDialog.listbox = function (
4040
selectedEntryIsString = isNaN(parseInt(data.selectedEntries[0] as any));
4141
if (title && title.length) {
4242
// pass
43-
} else if (selectedEntryIsString)
43+
} else if (selectedEntryIsString) {
4444
title = builder._cleanText(data.selectedEntries[0] as string);
45-
else if (
45+
} else if (
4646
data.entries &&
4747
data.entries.length > (data.selectedEntries[0] as number)
48-
)
48+
) {
4949
title = data.entries[data.selectedEntries[0] as number];
50+
}
5051
}
5152
title = builder._cleanText(title);
5253

@@ -133,14 +134,18 @@ JSDialog.listbox = function (
133134
}
134135
}
135136
}
136-
// no selected entry; set the visible value to empty string unless the font is not included in the entries
137+
138+
// no selected entry; set the visible value to empty string
139+
// unless the font is not included in the entries
137140
if (!hasSelectedEntry) {
138141
if (title) {
139142
const newOption = window.L.DomUtil.create('option', '', listbox);
140143
newOption.value = ++index;
141144
newOption.innerText = title;
142145
newOption.selected = true;
143-
} else $(listbox).val('');
146+
} else {
147+
$(listbox).val('');
148+
}
144149
}
145150

146151
return false;

0 commit comments

Comments
 (0)