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

@@ -35,7 +35,7 @@
const hashes = new URI().getData("hashes").split("|");
const setUpLimit = () => {
const limit = $("uplimitUpdatevalue").value.toInt() * 1024;
const limit = Number($("uplimitUpdatevalue").value) * 1024;
if (hashes[0] === "global") {
new Request({
url: "api/v2/transfer/setUploadLimit",