stripping - from additional app name number
This commit is contained in:
parent
a4c04fd329
commit
67bfa63861
|
@ -167,11 +167,13 @@
|
|||
const autoCreateApp = async () => {
|
||||
try {
|
||||
// Auto name app if has same name
|
||||
let appName = template.key.replace("app/", "")
|
||||
const templateKey = template.key.split("/")[1]
|
||||
|
||||
let appName = templateKey.replace(/-/g, " ")
|
||||
const appsWithSameName = $apps.filter(app =>
|
||||
app.name?.startsWith(appName)
|
||||
)
|
||||
appName = `${appName}-${appsWithSameName.length + 1}`
|
||||
appName = `${appName} ${appsWithSameName.length + 1}`
|
||||
|
||||
// Create form data to create app
|
||||
let data = new FormData()
|
||||
|
|
Loading…
Reference in New Issue