mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #14009 from overleaf/bg-project-name-validation-clone-whitespace
trim whitespace from project name when cloning GitOrigin-RevId: cb3908a49ad15a9ad4f4e5d490932c4d97a84590
This commit is contained in:
parent
c63899834a
commit
5c5649bc8c
1 changed files with 3 additions and 0 deletions
|
@ -50,6 +50,9 @@ async function duplicate(owner, originalProjectId, newProjectName) {
|
|||
])
|
||||
segmentation.duplicatedFromProject = originalProjectId
|
||||
|
||||
// remove any leading or trailing spaces
|
||||
newProjectName = newProjectName.trim()
|
||||
|
||||
// Now create the new project, cleaning it up on failure if necessary
|
||||
const newProject = await ProjectCreationHandler.promises.createBlankProject(
|
||||
owner._id,
|
||||
|
|
Loading…
Reference in a new issue