This commit is contained in:
1 parent
e6d7f2280b
commit
8efd032cc6
71 files changed
+6796
-3751
No files matched your search
@@ -43,7 +43,9 @@ export async function saveMaintenance(formData: FormData): Promise<void> {
|
||||
|
||||
// Coerce the rank to a non-negative integer; fall back to AtomCMS's default
|
||||
// of 5 when the field is blank or garbage.
|
||||
const rawRank = String(formData.get("min_rank") ?? "").normalize("NFC").trim();
|
||||
const rawRank = String(formData.get("min_rank") ?? "")
|
||||
.normalize("NFC")
|
||||
.trim();
|
||||
const parsedRank = Number.parseInt(rawRank, 10);
|
||||
const minRank = Number.isFinite(parsedRank) && parsedRank >= 0 ? parsedRank : 5;
|
||||
|
||||
|
||||
Reference in new issue
Block a user