mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-28 16:00:24 +01:00
include 0 in the auto numeric suffix field name
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user