Skip to content

Commit c9886b9

Browse files
Better control of momonitoredStyleUrls (#141)
* Better control of momonitoredStyleUrls * changelog update
1 parent b6d1e14 commit c9886b9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

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

src/Map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ export class Map extends maplibregl.Map {
285285
// If the URL is present in the list of monitored style URL,
286286
// that means this AJAXError was about a style, and we want to fallback to
287287
// the default style
288-
if (this.monitoredStyleUrls.has(clearnUrlStr)) {
288+
if (this.monitoredStyleUrls && this.monitoredStyleUrls.has(clearnUrlStr)) {
289289
this.monitoredStyleUrls.delete(clearnUrlStr);
290290
applyFallbackStyle();
291291
}

0 commit comments

Comments
 (0)