Skip to content

Commit

Permalink
Better control of momonitoredStyleUrls (#141)
Browse files Browse the repository at this point in the history
* Better control of momonitoredStyleUrls

* changelog update
  • Loading branch information
jonathanlurie authored Dec 13, 2024
1 parent b6d1e14 commit c9886b9
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 @@ -2,6 +2,7 @@

## 2.5.1
### Bug Fixes
- Better control of the status of `monitoredStyleUrls` in Map instance when error is caught (https://github.com/maptiler/maptiler-sdk-js/pull/141)
- Added extra integrity checks on style object when updating language (https://github.com/maptiler/maptiler-sdk-js/pull/142)
- The Geolocate control no longer throwing error when window is lost (issue on Firefox only) (https://github.com/maptiler/maptiler-sdk-js/pull/140)

Expand Down
2 changes: 1 addition & 1 deletion src/Map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export class Map extends maplibregl.Map {
// If the URL is present in the list of monitored style URL,
// that means this AJAXError was about a style, and we want to fallback to
// the default style
if (this.monitoredStyleUrls.has(clearnUrlStr)) {
if (this.monitoredStyleUrls && this.monitoredStyleUrls.has(clearnUrlStr)) {
this.monitoredStyleUrls.delete(clearnUrlStr);
applyFallbackStyle();
}
Expand Down

0 comments on commit c9886b9

Please sign in to comment.