summaryrefslogtreecommitdiff
path: root/packages/integrations/react/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/react/client.js')
-rw-r--r--packages/integrations/react/client.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/integrations/react/client.js b/packages/integrations/react/client.js
index cef488c83..90e4ceb83 100644
--- a/packages/integrations/react/client.js
+++ b/packages/integrations/react/client.js
@@ -15,6 +15,10 @@ function createReactElementFromDOMElement(element) {
for (const attr of element.attributes) {
attrs[attr.name] = attr.value;
}
+ // If the element has no children, we can create a simple React element
+ if (element.firstChild === null) {
+ return createElement(element.localName, attrs);
+ }
return createElement(
element.localName,