@codecademy/gamut
68.2.268.2.3-alpha.809fdd.0
dist/utils/react.js~
dist/utils/react.jsModified+2−1
Index: package/dist/utils/react.js
===================================================================
--- package/dist/utils/react.js
+++ package/dist/utils/react.js
@@ -32,9 +32,10 @@
if (typeof child === 'boolean' || child == null) {
return '';
}
if (/*#__PURE__*/isValidElement(child)) {
- const textContent = child.props.children ?? child.props.text ?? '';
+ const props = child.props;
+ const textContent = props.children ?? props.text ?? '';
return extractTextContent(textContent);
}
return '';
}).filter(Boolean).join(' ');