We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 412373a commit e329e21Copy full SHA for e329e21
react-migration-toolkit/src/components/yield-wrapper.tsx
@@ -12,7 +12,11 @@ export const YieldWrapper: React.FC<YieldWrapperProps> = ({ nodes }) => {
12
13
if (element?.parentNode) {
14
const fragment = document.createDocumentFragment();
15
- for (const node of nodes) {
+
16
+ // Filter out the wrapper element itself from the nodes to prevent circular reference
17
+ const filteredNodes = nodes.filter((node) => node !== element);
18
19
+ for (const node of filteredNodes) {
20
fragment.appendChild(node);
21
}
22
0 commit comments