We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6867b3e commit 92316d6Copy full SHA for 92316d6
src/withNextInputAutoFocus.js
@@ -12,10 +12,11 @@ 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
+ debugger;
17
return partialInputs.concat(getInputs(child.props.children));
18
}
- if (child && !!child.props.name) return partialInputs.concat(child);
19
+ if (child && child.props && !!child.props.name) return partialInputs.concat(child);
20
return partialInputs;
21
}, []);
22
0 commit comments