Apply suggestions from code review

This commit is contained in:
Vladimir Golovnev 2025-04-30 16:44:46 +03:00 committed by GitHub
commit 763a50bd88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2924,7 +2924,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
if (document.getElementById("maxSeedingTimeCheckbox").checked) { if (document.getElementById("maxSeedingTimeCheckbox").checked) {
maxSeedingTime = Number(document.getElementById("maxSeedingTimeValue").value); maxSeedingTime = Number(document.getElementById("maxSeedingTimeValue").value);
if (Number.isNaN(maxSeedingTime) || (maxSeedingTime < 0)) { if (Number.isNaN(maxSeedingTime) || (maxSeedingTime < 0)) {
alert("QBT_TR(Seeding time limit must have a positive value.)QBT_TR[CONTEXT=HttpServer]"); alert("QBT_TR(Seeding time limit must not have a negative value.)QBT_TR[CONTEXT=HttpServer]");
return; return;
} }
} }
@ -2935,7 +2935,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
if (document.getElementById("maxInactiveSeedingTimeCheckbox").checked) { if (document.getElementById("maxInactiveSeedingTimeCheckbox").checked) {
maxInactiveSeedingTime = Number(document.getElementById("maxInactiveSeedingTimeValue").value); maxInactiveSeedingTime = Number(document.getElementById("maxInactiveSeedingTimeValue").value);
if (Number.isNaN(maxInactiveSeedingTime) || (maxInactiveSeedingTime < 0)) { if (Number.isNaN(maxInactiveSeedingTime) || (maxInactiveSeedingTime < 0)) {
alert("QBT_TR(Seeding time limit must have a positive value.)QBT_TR[CONTEXT=HttpServer]"); alert("QBT_TR(Seeding time limit must not have a negative value.)QBT_TR[CONTEXT=HttpServer]");
return; return;
} }
} }