Skip to content

Commit

Permalink
fix: do not show browser counter when layer is empty or not loaded
Browse files Browse the repository at this point in the history
fix #2215
  • Loading branch information
yohanboniface committed Oct 15, 2024
1 parent 8daf4cd commit 0977667
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions umap/static/umap/js/modules/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default class Browser {
datalayer.eachFeature((feature) => this.addFeature(feature, container))

const total = datalayer.count()
if (!total) return
const current = container.querySelectorAll('li').length
const count = total === current ? total : `${current}/${total}`
const counter = DomUtil.create('span', 'datalayer-counter', headline)
Expand Down

0 comments on commit 0977667

Please sign in to comment.