Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix blank map when loading widgets for tilesets #733

Merged

Conversation

Shylpx
Copy link
Contributor

@Shylpx Shylpx commented Jul 5, 2023

Description

With this change now data can be null, so this breaks some widgets (like CategoryWidget, or HistogramWidget), when they access to the .length propertly.

In the past, we were ignoring undefined and null values, and undefined works fine because a default empty array is used. However, for null values, the map crashes. I was able to reproduce it with tilesets using category and histogram widgets, when we are dropping features.

Type of change

  • Fix

Acceptance

  • Without the change

without-the-fix

  • With the change (local environment)

with-the-fix

@Shylpx Shylpx added bug Something isn't working widgets labels Jul 5, 2023
@Shylpx Shylpx requested a review from a team July 5, 2023 12:06
@Shylpx Shylpx self-assigned this Jul 5, 2023
@shortcut-integration
Copy link

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

Pull Request Test Coverage Report for Build 5466430457

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.009%) to 71.625%

Totals Coverage Status
Change from base Build 5462921253: -0.009%
Covered Lines: 2256
Relevant Lines: 2920

💛 - Coveralls

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

Visit the preview URL for this PR (updated for commit 69d8834):

https://cartodb-fb-storybook-react-dev--pr733-bug-sc-327815-te-c6kcoe5v.web.app

(expires Wed, 12 Jul 2023 16:07:44 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 517cc4d31d7e09cf277774e034094b67c301cd4c

@VictorVelarde VictorVelarde merged commit 97ebae3 into master Jul 5, 2023
1 check passed
@VictorVelarde VictorVelarde deleted the bug/sc-327815/team-blank-map-when-loading-a-widget-from branch July 5, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working widgets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants