Skip to content

Commit

Permalink
fix: 조건문 수정 및 의존성 배열 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kimeodml committed Mar 14, 2024
1 parent b1bb6f2 commit 8ff7ac7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/Home/Map/hooks/useCluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ function useCluster({ markerArray, map }: ClusterProps) {
}, [map, markerArray]);

useEffect(() => {
if (!auth && cluster && markerArray.length > 0) {
if (cluster) {
cluster.setMap(null);
}
}, [auth, markerArray]);
}, [auth, map, markerArray]);

return { cluster };
}
Expand Down

0 comments on commit 8ff7ac7

Please sign in to comment.