Skip to content

Commit

Permalink
Fix edits that broke a page.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic committed Dec 19, 2019
1 parent 0a10def commit 95db04f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 95db04f

Please sign in to comment.