From d2cd488cb0901e98d256ea6d911953bf6d838c86 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Mon, 5 Dec 2022 16:44:24 -0700 Subject: [PATCH 1/2] fix console error --- src/components/Form.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/Form.js b/src/components/Form.js index dfdfc24a7eae..d6a52f151f10 100644 --- a/src/components/Form.js +++ b/src/components/Form.js @@ -110,6 +110,10 @@ class Form extends React.Component { } setPosition(element, position) { + if (!element.props) { + return; + } + if (!element.props.inputID && element.props.children) { _.forEach(element.props.children, (child) => { this.setPosition(child, position); From 3d09435b1a618742bfa0a56939899f74d5d22b71 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Mon, 5 Dec 2022 16:57:29 -0700 Subject: [PATCH 2/2] add comment --- src/components/Form.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Form.js b/src/components/Form.js index d6a52f151f10..7042e296cd5e 100644 --- a/src/components/Form.js +++ b/src/components/Form.js @@ -110,6 +110,7 @@ class Form extends React.Component { } setPosition(element, position) { + // Some elements might not have props defined, e.g. Text if (!element.props) { return; }