Skip to content

Commit

Permalink
coerce zoom to a number in getClusters, close #148
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Jun 2, 2020
1 parent ccb429c commit 33af0f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export default class Supercluster {
}

_limitZoom(z) {
return Math.max(this.options.minZoom, Math.min(z, this.options.maxZoom + 1));
return Math.max(this.options.minZoom, Math.min(+z, this.options.maxZoom + 1));
}

_cluster(points, zoom) {
Expand Down

0 comments on commit 33af0f8

Please sign in to comment.