Skip to content

Commit

Permalink
fix legend widget return bug (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
juandjara authored Jul 24, 2024
1 parent 4e15147 commit 0e83a7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

## Not released

- onStateChange callback for range widget [#890](https://github.com/CartoDB/carto-react/pull/890)
- fix LegendWidget update logic for multiple legends case [#889](https://github.com/CartoDB/carto-react/pull/889)
- onStateChange callback for all widgets [#886](https://github.com/CartoDB/carto-react/pull/886)
- fix legend widget return bug [#893](https://github.com/CartoDB/carto-react/pull/893)

## 3.0.0

Expand Down
2 changes: 1 addition & 1 deletion packages/react-widgets/src/widgets/LegendWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function LegendWidget({ customLegendTypes, initialCollapsed, layerOrder = [], ti
const dispatch = useDispatch();
const reduxLayers = useSelector((state) => state.carto.layers);
const layers = useMemo(() => {
sortLayers(
return sortLayers(
Object.values(reduxLayers).filter((layer) => !!layer.legend),
layerOrder
).filter((l) => !!l.legend);
Expand Down

0 comments on commit 0e83a7b

Please sign in to comment.