Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 0008959

Browse files
authored
Merge pull request #513 from mesosphere/react16/field-input
fix: check if DOM node exists
2 parents a294844 + 7b6e211 commit 0008959

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Form/FieldInput.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ class FieldInput extends Util.mixin(BindMixin) {
6666
props.handleSubmit();
6767
}
6868

69-
ReactDOM.findDOMNode(this.inputElementRef.current).blur();
69+
const inputNode = ReactDOM.findDOMNode(this.inputElementRef.current);
70+
71+
if (inputNode) {
72+
inputNode.blur();
73+
}
7074
}
7175
}
7276

0 commit comments

Comments
 (0)