Skip to content

Commit

Permalink
Merge pull request #513 from mesosphere/react16/field-input
Browse files Browse the repository at this point in the history
fix: check if DOM node exists
  • Loading branch information
nLight committed Feb 18, 2019
2 parents a294844 + 7b6e211 commit 0008959
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Form/FieldInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ class FieldInput extends Util.mixin(BindMixin) {
props.handleSubmit();
}

ReactDOM.findDOMNode(this.inputElementRef.current).blur();
const inputNode = ReactDOM.findDOMNode(this.inputElementRef.current);

if (inputNode) {
inputNode.blur();
}
}
}

Expand Down

0 comments on commit 0008959

Please sign in to comment.