diff --git a/python/ipywidgets/ipywidgets/widgets/widget.py b/python/ipywidgets/ipywidgets/widgets/widget.py index 2dc674097d..cb05ff2bbb 100644 --- a/python/ipywidgets/ipywidgets/widgets/widget.py +++ b/python/ipywidgets/ipywidgets/widgets/widget.py @@ -684,7 +684,7 @@ def add_traits(self, **traits): """Dynamically add trait attributes to the Widget.""" super().add_traits(**traits) for name, trait in traits.items(): - if trait.get_metadata('sync'): + if 'sync' in trait.metadata: self.keys.append(name) self.send_state(name)