1
0
Эх сурвалжийг харах

avoid creating a new bindings entry

Falko Schindler 2 жил өмнө
parent
commit
de55747283
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      nicegui/binding.py

+ 1 - 1
nicegui/binding.py

@@ -30,7 +30,7 @@ def propagate(source_obj: Any, source_name: str, visited: Set[Tuple[int, str]] =
     if visited is None:
         visited = set()
     visited.add((id(source_obj), source_name))
-    for _, target_obj, target_name, transform in bindings[(id(source_obj), source_name)]:
+    for _, target_obj, target_name, transform in bindings.get((id(source_obj), source_name), []):
         if (id(target_obj), target_name) in visited:
             continue
         target_value = transform(getattr(source_obj, source_name))