Skip to content

Commit

Permalink
fix(geo): add missing dependency for legend data memoization
Browse files Browse the repository at this point in the history
  • Loading branch information
plouc committed Dec 21, 2019
1 parent ae62116 commit 887c57e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/geo/src/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ export const useChoropleth = ({
return format(valueFormat)
}, [valueFormat])

const colorScale = useMemo(() => guessQuantizeColorScale(colors).domain(domain), [colors])
const colorScale = useMemo(() => guessQuantizeColorScale(colors).domain(domain), [
colors,
domain,
])
const getFillColor = useMemo(() => {
return feature => {
if (feature.value === undefined) return unknownColor
Expand Down

0 comments on commit 887c57e

Please sign in to comment.