include 0 in the auto numeric suffix field name

This commit is contained in:
Gani Georgiev
2024-01-21 20:57:48 +02:00
parent f0410a7625
commit bf30af393e
33 changed files with 42 additions and 42 deletions
@@ -78,7 +78,7 @@
let result = name;
let counter = 2;
let suffix = name.match(/[123456789]+$/)?.[0] || ""; // extract numeric suffix
let suffix = name.match(/\d+$/)?.[0] || ""; // extract numeric suffix
// name without the suffix
let base = suffix ? name.substring(0, name.length - suffix.length) : name;