a small incremental UI library for the web
javascript web ui
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix reconciliation for null children

garrison cd1887a9 b31faf76

+5 -3
+5 -3
js/fiber.ts
··· 93 93 } 94 94 95 95 export function reconcileChildren(parentFiber, childElementOrElements) { 96 - if (!childElementOrElements) return; 97 - 98 - if (Array.isArray(childElementOrElements)) { 96 + if (childElementOrElements === undefined || childElementOrElements === null) { 97 + // If there are no children we still need to delete any existing children 98 + return reconcileArray(parentFiber, []); 99 + } 100 + else if (Array.isArray(childElementOrElements)) { 99 101 const elementsFlat = childElementOrElements.flat(); 100 102 return reconcileArray(parentFiber, elementsFlat); 101 103 }