diff --git a/x-pack/legacy/plugins/searchprofiler/public/np_ready/application/containers/profile_query_editor.tsx b/x-pack/legacy/plugins/searchprofiler/public/np_ready/application/containers/profile_query_editor.tsx index ea3421ffe89aa..b879f15b72998 100644 --- a/x-pack/legacy/plugins/searchprofiler/public/np_ready/application/containers/profile_query_editor.tsx +++ b/x-pack/legacy/plugins/searchprofiler/public/np_ready/application/containers/profile_query_editor.tsx @@ -86,8 +86,10 @@ export const ProfileQueryEditor = memo(() => { { - indexInputRef.current = ref!; - ref!.value = DEFAULT_INDEX_VALUE; + if (ref) { + indexInputRef.current = ref; + ref.value = DEFAULT_INDEX_VALUE; + } }} />