include 0 in the auto numeric suffix field name

This commit is contained in:
Gani Georgiev committed 2024-01-21 20:57:48 +02:00
1 parent f0410a7625
commit bf30af393e
33 files changed
+42 -42

No files matched your search

@@ -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;