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: avoid crash if layer title is undefined #3286

Merged
merged 4 commits into from
Aug 14, 2024

Conversation

turban
Copy link
Contributor

@turban turban commented Jul 24, 2024

To set the data-test attribute on the LayerCard div we use replace to remove whitespace from the title (introduced in #3021).

In some edge cases title can be undefined, and we avoid this error if we set the fallback value to ''.

This crash bug was reported for https://qa.im.dhis2.org/master/dhis-web-maps/#/AHWtSmx21sx

The error occurs for two saved maps with old EE layers that should be removed from from Sierra Leone demo database:

  • Map: Nighttime lights (AHWtSmx21sx)
  • Malaria: Cases with elevation eastern area (gJ1BHisY9Wm)

@dhis2-bot
Copy link
Contributor

dhis2-bot commented Jul 24, 2024

🚀 Deployed on https://pr-3286--dhis2-maps.netlify.app

@dhis2-bot dhis2-bot temporarily deployed to netlify July 24, 2024 08:31 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify July 31, 2024 06:50 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify August 8, 2024 09:36 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify August 14, 2024 09:05 Inactive
@jenniferarnesen jenniferarnesen merged commit 69c3eed into master Aug 14, 2024
18 checks passed
@jenniferarnesen jenniferarnesen deleted the fix/ee-nightlights-legacy branch August 14, 2024 09:37
dhis2-bot added a commit that referenced this pull request Aug 14, 2024
## [100.6.1](v100.6.0...v100.6.1) (2024-08-14)

### Bug Fixes

* avoid crash when opening map with unsupported Earth Engine layer ([#3286](#3286)) ([69c3eed](69c3eed)), closes [#3021](#3021)
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.6.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants