From 745e67ebe0ac323146cbbb736ee0430e92bcc286 Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Sat, 12 Aug 2023 08:41:43 -0400 Subject: [PATCH] Fix vis control error (#1660) --- geemap/toolbar.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/geemap/toolbar.py b/geemap/toolbar.py index 73b9f67317..730e2a3b9b 100644 --- a/geemap/toolbar.py +++ b/geemap/toolbar.py @@ -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