Skip to content

Commit ce4f338

Browse files
authored
Handle empty tagName by using Fragment
Addresses #1323. I spent hours digging this bug down. Without this little change, it was impossible to nest a custom reactpy component (i.e. a function wrapped with the component decorator). It would yield an error along the lines of "Cannot create element with
1 parent b4c06e3 commit ce4f338

File tree

1 file changed

+1
-1
lines changed
  • src/js/packages/@reactpy/client/src

1 file changed

+1
-1
lines changed

src/js/packages/@reactpy/client/src/vdom.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function createImportSourceElement(props: {
9393
}
9494
}
9595
} else {
96-
type = props.model.tagName;
96+
type = props.model.tagName === "" ? Fragment : props.model.tagName;
9797
}
9898
return props.binding.create(
9999
type,

0 commit comments

Comments
 (0)