Skip to content

Commit

Permalink
Fix vis control error (#1660)
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs authored Aug 12, 2023
1 parent 435a3c3 commit 745e67e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion geemap/toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,10 @@ def layer_vis_on_click(change):
else:
if hasattr(m, "_vis_widget") and m._vis_widget is not None:
m._vis_widget = None
if m._vis_control is not None:
if (
hasattr(m, "_vis_control")
and m._vis_control is not None
):
if m._vis_control in m.controls:
m.remove_control(m._vis_control)
m._vis_control = None
Expand Down

0 comments on commit 745e67e

Please sign in to comment.