mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-28 19:41:33 +02:00
Throw error if project name has leading or trailing whitespace (#15842)
GitOrigin-RevId: 65dc375535dbab66b7446642c6b2d14c978d3c38
This commit is contained in:
@@ -138,17 +138,9 @@ async function validateProjectName(name) {
|
||||
)
|
||||
}
|
||||
if (name !== name.trim()) {
|
||||
const message = 'Project name cannot start or end with whitespace'
|
||||
|
||||
const error = new Errors.InvalidNameError({
|
||||
message,
|
||||
info: { name },
|
||||
})
|
||||
|
||||
logger.warn({ error }, message)
|
||||
|
||||
// TODO: throw the error, after checking that it won't cause problems
|
||||
// throw error
|
||||
throw new Errors.InvalidNameError(
|
||||
'Project name cannot start or end with whitespace'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user