Skip to content

Commit

Permalink
Update style.js (#9347)
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner authored Feb 26, 2020
1 parent 5bbfde0 commit c7b72da
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/style/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,7 @@ class Style extends Evented {
* @returns {boolean} a boolean specifying if the given layer is present
*/
hasLayer(id: string): boolean {
const layerIds = Object.keys(this._layers);
return layerIds.includes(id, 0);
return id in this._layers;
}

setLayerZoomRange(layerId: string, minzoom: ?number, maxzoom: ?number) {
Expand Down

0 comments on commit c7b72da

Please sign in to comment.