Skip to content

Commit 103412d

Browse files
committed
fix: AttributeError when layout is a function in dash layout setter
1 parent 501b715 commit 103412d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dash/dash.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,10 @@ def simple_clone(c, children=None):
727727
return cls(**props)
728728

729729
layout_value = self._layout_value()
730+
731+
if isinstance(layout_value, (list, tuple)):
732+
layout_value = html.Div(children=layout_value)
733+
730734
_validate.validate_layout(value, layout_value)
731735
self.validation_layout = simple_clone(
732736
# pylint: disable=protected-access

0 commit comments

Comments
 (0)