Skip to content

Commit

Permalink
Merge pull request #12 from am2222/bugfix/mp-11-fix-crash-on-invalid-…
Browse files Browse the repository at this point in the history
…zoom

bugfix(#11): mp-11-fixed-crash-on-invalid-zoom
  • Loading branch information
am2222 authored Jun 4, 2024
2 parents 8a7f0c8 + a8d6acd commit 4e13ae1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@ export class PmTilesSource extends VectorTileSourceImpl {
this._loaded = true;

extend(this, tileJSON);
// fix for the corrupted tilejson
this.minzoom = Number.parseInt(this.minzoom.toString()) || 0;
this.maxzoom = Number.parseInt(this.maxzoom.toString()) || 0;
// we set this.type after extend to avoid overwriting
this.tileType = tileType

Expand Down

0 comments on commit 4e13ae1

Please sign in to comment.