Skip to content

Commit

Permalink
fix: use deep compare effect to prevent infowindow close (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrMetalWood authored Jan 2, 2025
1 parent c13ea46 commit bfa85c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/info-window.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const InfoWindow: FunctionComponent<

// ## open info window when content and map are available
const map = useMap();
useEffect(() => {
useDeepCompareEffect(() => {
// `anchor === null` means an anchor is defined but not ready yet.
if (!map || !infoWindow || anchor === null) return;

Expand Down

0 comments on commit bfa85c1

Please sign in to comment.