Skip to content

Commit

Permalink
add extra check on style obj
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlurie committed Dec 6, 2024
1 parent 6d46220 commit 4dfd096
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# MapTiler SDK Changelog

## 2.5.1
### Bug Fixes
- Added extra integrity checks on style object when updating language

## 2.5.0
### others
- Update MapTiler Client library to v2.5.0
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@maptiler/sdk",
"version": "2.5.0",
"version": "2.5.1",
"description": "The Javascript & TypeScript map SDK tailored for MapTiler Cloud",
"module": "dist/maptiler-sdk.mjs",
"types": "dist/maptiler-sdk.d.ts",
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 4dfd096

Please sign in to comment.