Warning: Failed prop type: Invalid prop `children` supplied to `ForwardRef(FormHelperText)`, expected a ReactNode.
at FormHelperText (http://localhost:3000/static/js/0.chunk.js:19993:24)
at WithStyles(ForwardRef(FormHelperText)) (http://localhost:3000/static/js/0.chunk.js:54661:31)
at div
at FormControl (http://localhost:3000/static/js/0.chunk.js:19303:24)
at WithStyles(ForwardRef(FormControl)) (http://localhost:3000/static/js/0.chunk.js:54661:31)
I guess it's because we cannot render true which is returned from this.getErrorMessage(). So when I do:
Everything still works as expected and we don't see this issue anymore. Curious: So is true used somewhere else or why does getErrorMessage return a different data structure based in the if/else conditions?
Is there a reason why
getErrorMessage
returns true? We are using this component as stated over here. However, when usingin our code, we get the warning:
I guess it's because we cannot render
true
which is returned fromthis.getErrorMessage()
. So when I do:Everything still works as expected and we don't see this issue anymore. Curious: So is
true
used somewhere else or why doesgetErrorMessage
return a different data structure based in the if/else conditions?Otherwise, this PR would fix this issue.