Skip to content

Commit

Permalink
add extra check on style obj (#142)
Browse files Browse the repository at this point in the history
* add extra check on style obj

* changelog update
  • Loading branch information
jonathanlurie authored Dec 13, 2024
1 parent 8477320 commit c73f84e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# MapTiler SDK Changelog

## 2.5.1
### Bug fixes
### Bug Fixes
- 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)

## 2.5.0
Expand Down
2 changes: 1 addition & 1 deletion src/Map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ export class Map extends maplibregl.Map {
}

private getStyleLanguage(): LanguageInfo | null {
if (!this.style.stylesheet.metadata) return null;
if (!this.style || !this.style.stylesheet || !this.style.stylesheet.metadata) return null;
if (typeof this.style.stylesheet.metadata !== "object") return null;

if (
Expand Down

0 comments on commit c73f84e

Please sign in to comment.