fix(frontend): invalid username for superadmin in some workspaces (#5350)

This commit is contained in:
HugoCasa
2025-02-21 18:30:55 +01:00
committed by GitHub
parent 7e5469bddf
commit 7d73decd8d
@@ -118,7 +118,9 @@
}
Object.assign(flow, template)
const oldPath = templatePath.split('/')
initialPath = `u/${$userStore?.username.split('@')[0]}/${oldPath[oldPath.length - 1]}_fork`
initialPath = `u/${$userStore?.username.split('@')[0].replace(/[^a-zA-Z0-9_]/g, '')}/${
oldPath[oldPath.length - 1]
}_fork`
flow = flow
goto('?', { replaceState: true })
selectedId = 'settings-metadata'