Skip to content

Commit

Permalink
fix: is children is of length 1, pass as single element, not a list
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Feb 19, 2024
1 parent 371e937 commit 0eb7feb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,9 @@ export class ReactModel extends DOMWidgetModel {
childrenComponents,
view,
);
if (childrenProps.children && childrenProps.children.length === 1) {
childrenProps.children = childrenProps.children[0];
}
// useEffect(() => {
// // force render every 2 seconds
// const interval = setInterval(() => {
Expand Down

0 comments on commit 0eb7feb

Please sign in to comment.