From 939337ad0bfb96d47300c8a3a32c9870e44a979b Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Mon, 18 Jun 2018 00:55:03 +0200 Subject: [PATCH] fix(NextInputAutoFocus): define getInputs as const --- src/withNextInputAutoFocus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/withNextInputAutoFocus.js b/src/withNextInputAutoFocus.js index ee5dc0e..1f6b57b 100644 --- a/src/withNextInputAutoFocus.js +++ b/src/withNextInputAutoFocus.js @@ -10,7 +10,7 @@ const withNextInputAutoFocusContextType = { getReturnKeyType: PropTypes.func }; -getInputs = children => +const getInputs = children => (isArray(children) ? children : [children]).reduce((partialInputs, child) => { if (child.props && child.props.children) { return partialInputs.concat(getInputs(child.props.children));