From 6dc939dd61b60076de64a19ec0b83c799a3db186 Mon Sep 17 00:00:00 2001 From: Beton Date: Wed, 15 Aug 2018 19:15:52 +0300 Subject: [PATCH] Fix passing invalid property `formRef` to form --- src/Form/Form.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Form/Form.tsx b/src/Form/Form.tsx index 3c75573..954c6b5 100644 --- a/src/Form/Form.tsx +++ b/src/Form/Form.tsx @@ -106,12 +106,11 @@ export class Form onValidate, onSubmit, method, + formRef, ...childProps } = this.props; - if (this.props.formRef) { - childProps.ref = this.props.formRef; - } + formRef && (childProps.ref = formRef); return (