add minor fix for required fields that are not displayed (#129)

This commit is contained in:
anovazzi1 2023-04-06 16:57:16 -03:00 committed by GitHub
commit b2402d6930
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,7 +92,7 @@ export default function Chat({ flow, reactFlowInstance }: ChatType) {
return Object.keys(template).reduce(
(errors: Array<string>, t) =>
errors.concat(
template[t].required &&
(template[t].required && template[t].show) &&
(!template[t].value || template[t].value === "") &&
!reactFlowInstance
.getEdges()