Skip to content

Commit

Permalink
fix(27215): fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
vanch3d committed Nov 25, 2024
1 parent 5b0e6f3 commit 8f2707f
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,17 @@ export const validationTag = validationTopic
export const customLocalizer = (errors?: null | ErrorObject[]) => {
if (!errors) return

for (const aa of errors) {
if (aa.keyword !== 'format') continue
if (aa.schema === 'mqtt-topic') {
aa.message = validationTopic(aa.data as string)
for (const error of errors) {
if (error.keyword !== 'format') continue
if (error.schema === 'mqtt-topic') {
error.message = validationTopic(error.data as string)
continue
}
if (aa.schema === 'mqtt-topic-filter') {
aa.message = validationTopicFilter(aa.data as string)
if (error.schema === 'mqtt-topic-filter') {
error.message = validationTopicFilter(error.data as string)
}
if (aa.schema === 'mqtt-tag') {
aa.message = validationTag(aa.data as string)
if (error.schema === 'mqtt-tag') {
error.message = validationTag(error.data as string)
}
}
}
Expand Down

0 comments on commit 8f2707f

Please sign in to comment.