Skip to content

Commit

Permalink
[SearchProfiler] Fix console error message when umounting (#50105)
Browse files Browse the repository at this point in the history
* Safer access of input ref

* Remove unnecessary "!" [skip ci]
  • Loading branch information
jloleysens authored Nov 11, 2019
1 parent e2d3c87 commit 0491589
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ export const ProfileQueryEditor = memo(() => {
<EuiFieldText
disabled={!licenseEnabled}
inputRef={ref => {
indexInputRef.current = ref!;
ref!.value = DEFAULT_INDEX_VALUE;
if (ref) {
indexInputRef.current = ref;
ref.value = DEFAULT_INDEX_VALUE;
}
}}
/>
</EuiFormRow>
Expand Down

0 comments on commit 0491589

Please sign in to comment.