浏览代码

fix previous commit

Falko Schindler 3 年之前
父节点
当前提交
75e151f3e4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      nicegui/elements/group.py

+ 2 - 2
nicegui/elements/group.py

@@ -23,8 +23,8 @@ class Group(Element):
 
     def clear(self):
         def collect_components(view: jp.HTMLBaseComponent) -> List[jp.HTMLBaseComponent]:
-            children = getattr(view, 'components', [])
-            return children + [view for child in children for view in collect_components(child)]
+            return getattr(view, 'components', []) + \
+                [view for child in getattr(view, 'components', []) for view in collect_components(child)]
         components = collect_components(self.view)
 
         active_links[:] = [