@dust-tt/sparkle 0.2.87-rc → 0.2.87-rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -32215,14 +32215,16 @@ ContextItem.List = function (_a) {
32215
32215
  var children = _a.children, className = _a.className, hasBorder = _a.hasBorder;
32216
32216
  // Ensure all children are of type ContextItem or ContextItem.SectionHeader
32217
32217
  React.Children.forEach(children, function (child) {
32218
+ if (child === null || child === undefined)
32219
+ return;
32218
32220
  if (!React.isValidElement(child) ||
32219
32221
  (child.type !== ContextItem &&
32220
- child.type !== ContextItem.SectionHeader) ||
32221
- // all children of child must be of type ContextItem or ContextItem.SectionHeader
32222
- React.Children.toArray(child.props.children).some(function (c) {
32223
- return !React.isValidElement(c) ||
32224
- (c.type !== ContextItem && c.type !== ContextItem.SectionHeader);
32225
- })) {
32222
+ child.type !== ContextItem.SectionHeader &&
32223
+ // all children of child must be of type ContextItem or ContextItem.SectionHeader
32224
+ React.Children.toArray(child.props.children).some(function (c) {
32225
+ return !React.isValidElement(c) ||
32226
+ (c.type !== ContextItem && c.type !== ContextItem.SectionHeader);
32227
+ }))) {
32226
32228
  throw new Error("All children of ContextItem.List must be of type ContextItem or ContextItem.SectionHeader");
32227
32229
  }
32228
32230
  });