diff --git a/x-pack/legacy/plugins/uptime/public/components/functional/location_map/embeddables/embedded_map.tsx b/x-pack/legacy/plugins/uptime/public/components/functional/location_map/embeddables/embedded_map.tsx index b2f77458aa11b00..93de1d478fb836d 100644 --- a/x-pack/legacy/plugins/uptime/public/components/functional/location_map/embeddables/embedded_map.tsx +++ b/x-pack/legacy/plugins/uptime/public/components/functional/location_map/embeddables/embedded_map.tsx @@ -76,13 +76,15 @@ export const EmbeddedMap = ({ upPoints, downPoints }: EmbeddedMapProps) => { setEmbeddable(embeddableObject); } setupEmbeddable(); - }, [downPoints, factory, input, upPoints]); + // we want this effect to execute exactly once after the component mounts + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); useEffect(() => { if (embeddable) { embeddable.setLayerList(getLayerList(upPoints, downPoints)); } - }, [embeddable, upPoints, downPoints]); + }, [upPoints, downPoints, embeddable]); useEffect(() => { if (embeddableRoot.current && embeddable) {