Skip to content

Commit

Permalink
Don't show village add button if there are no villages to add
Browse files Browse the repository at this point in the history
  • Loading branch information
russss committed May 12, 2024
1 parent 0be31d4 commit b9d5e0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/src/villages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ class VillagesLayer {
this._user_id = json.id

this.villages = await villages_response.json()
setStyle(this._wrapper, 'display', 'block')
if (this.villages && this.villages.length > 0) {
setStyle(this._wrapper, 'display', 'block')
}
}

onAdd(map: maplibregl.Map) {
Expand Down

0 comments on commit b9d5e0b

Please sign in to comment.