Skip to content

Commit

Permalink
[SearchProfiler] Fix console error message when umounting (elastic#50105
Browse files Browse the repository at this point in the history
) (elastic#50157)

* Safer access of input ref

* Remove unnecessary "!" [skip ci]
  • Loading branch information
jloleysens committed Nov 11, 2019
1 parent b960860 commit 37785f7
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 37785f7

Please sign in to comment.