We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6867b3e + a0dd9d4 commit a22c534Copy full SHA for a22c534
1 file changed
src/withNextInputAutoFocus.js
@@ -12,10 +12,10 @@ const withNextInputAutoFocusContextType = {
12
13
getInputs = children =>
14
(isArray(children) ? children : [children]).reduce((partialInputs, child) => {
15
- if (child.props.children) {
+ if (child.props && child.props.children) {
16
return partialInputs.concat(getInputs(child.props.children));
17
}
18
- if (child && !!child.props.name) return partialInputs.concat(child);
+ if (child && child.props && !!child.props.name) return partialInputs.concat(child);
19
return partialInputs;
20
}, []);
21
0 commit comments