From 0fbec6ffd946d3e70a3b09053693b620423a662a Mon Sep 17 00:00:00 2001 From: Justin Kambic Date: Thu, 9 Jan 2020 15:27:53 -0500 Subject: [PATCH] Remove dependency that was causing effect to re-execute infinitely. (#54160) (#54356) --- x-pack/legacy/plugins/uptime/public/hooks/use_index_pattern.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/uptime/public/hooks/use_index_pattern.ts b/x-pack/legacy/plugins/uptime/public/hooks/use_index_pattern.ts index eb9b475a35716..f2b586b27dba6 100644 --- a/x-pack/legacy/plugins/uptime/public/hooks/use_index_pattern.ts +++ b/x-pack/legacy/plugins/uptime/public/hooks/use_index_pattern.ts @@ -16,5 +16,6 @@ export const useIndexPattern = (setIndexPattern: Dispatch) => { setIndexPattern(await fetch('/api/uptime/index_pattern', { method: 'GET' })); } getIndexPattern(); - }, [core.services.http, setIndexPattern]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [core.services.http]); };