@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 +8 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +8 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -32195,14 +32195,16 @@ ContextItem.List = function (_a) {
|
|
|
32195
32195
|
var children = _a.children, className = _a.className, hasBorder = _a.hasBorder;
|
|
32196
32196
|
// Ensure all children are of type ContextItem or ContextItem.SectionHeader
|
|
32197
32197
|
React__default.Children.forEach(children, function (child) {
|
|
32198
|
+
if (child === null || child === undefined)
|
|
32199
|
+
return;
|
|
32198
32200
|
if (!React__default.isValidElement(child) ||
|
|
32199
32201
|
(child.type !== ContextItem &&
|
|
32200
|
-
child.type !== ContextItem.SectionHeader
|
|
32201
|
-
|
|
32202
|
-
|
|
32203
|
-
|
|
32204
|
-
|
|
32205
|
-
|
|
32202
|
+
child.type !== ContextItem.SectionHeader &&
|
|
32203
|
+
// all children of child must be of type ContextItem or ContextItem.SectionHeader
|
|
32204
|
+
React__default.Children.toArray(child.props.children).some(function (c) {
|
|
32205
|
+
return !React__default.isValidElement(c) ||
|
|
32206
|
+
(c.type !== ContextItem && c.type !== ContextItem.SectionHeader);
|
|
32207
|
+
}))) {
|
|
32206
32208
|
throw new Error("All children of ContextItem.List must be of type ContextItem or ContextItem.SectionHeader");
|
|
32207
32209
|
}
|
|
32208
32210
|
});
|