mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 07:46:17 -07:00
WebUI: use native function to convert to numbers
Also replace `parseInt()` since `Number()` behavior is more intuitive. PR #21831.
This commit is contained in:
parent
ede08f3845
commit
f73f31619d
14 changed files with 77 additions and 76 deletions
|
@ -197,7 +197,7 @@ window.qBittorrent.PropFiles ??= (() => {
|
|||
|
||||
const updatePriorityCombo = (id, selectedPriority) => {
|
||||
const combobox = $("comboPrio" + id);
|
||||
if (parseInt(combobox.value, 10) !== selectedPriority)
|
||||
if (Number(combobox.value) !== selectedPriority)
|
||||
selectComboboxPriority(combobox, selectedPriority);
|
||||
};
|
||||
|
||||
|
@ -205,7 +205,7 @@ window.qBittorrent.PropFiles ??= (() => {
|
|||
const options = combobox.options;
|
||||
for (let i = 0; i < options.length; ++i) {
|
||||
const option = options[i];
|
||||
if (parseInt(option.value, 10) === priority)
|
||||
if (Number(option.value) === priority)
|
||||
option.selected = true;
|
||||
else
|
||||
option.selected = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue