mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
Merge pull request #31723 from overleaf/ar-do-not-queue-invalid-analytics-messages
[analytics] do not queue invalid analytics messages GitOrigin-RevId: 9182fe41974ab618e7a51330bfba6703894295f4
This commit is contained in:
@@ -49,6 +49,9 @@ function validateSchema(schema, data) {
|
||||
if (isZodErrorLike(err)) {
|
||||
const errorMessages = err.issues.map(issue => {
|
||||
const value = getPathValue(data, issue.path)
|
||||
if (issue.path.length === 0) {
|
||||
return issue.message
|
||||
}
|
||||
const fieldName = String(issue.path[issue.path.length - 1])
|
||||
if (isRequiredError(issue, value)) {
|
||||
return `"${fieldName}" is required`
|
||||
|
||||
Reference in New Issue
Block a user