Skip to content

Commit

Permalink
Fix blank map when loading widgets for tilesets (#733)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shylpx authored Jul 5, 2023
1 parent f59d85e commit 97ebae3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Not released

- Search by coordinates supported in useGeocoderWidgetController hook [#731](https://github.com/CartoDB/carto-react/pull/731)
- Fix blank map when loading widgets for tilesets [#733](https://github.com/CartoDB/carto-react/pull/733)

## 2.1

Expand Down
2 changes: 1 addition & 1 deletion packages/react-widgets/src/hooks/useWidgetFetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function useWidgetFetch(
if (outdated) return;

onStateChange?.({ state: WidgetStateType.Success, data });
setData(data);
setData(data ?? undefined);
})
.catch((error) => {
if (outdated) return;
Expand Down

0 comments on commit 97ebae3

Please sign in to comment.