WebUI: use native function to convert to numbers

Also replace `parseInt()` since `Number()` behavior is more intuitive.

PR #21831.
This commit is contained in:
Chocobo1
2024-11-16 15:41:20 +08:00
committed by GitHub
parent ede08f3845
commit f73f31619d
14 changed files with 77 additions and 76 deletions

View File

@@ -1011,7 +1011,7 @@ const initializeWindows = () => {
};
deleteTrackerFN = (trackerHash) => {
const trackerHashInt = Number.parseInt(trackerHash, 10);
const trackerHashInt = Number(trackerHash);
if ((trackerHashInt === TRACKERS_ALL) || (trackerHashInt === TRACKERS_TRACKERLESS))
return;