cynx-lib 1.3.112 → 1.3.113

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cynx-lib",
3
- "version": "1.3.112",
3
+ "version": "1.3.113",
4
4
  "type": "module",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -224,6 +224,7 @@ export default function Sidebar({
224
224
  };
225
225
 
226
226
  const isSectionCollapsible = (sec) => {
227
+ if (!sec || !sec.title) return false;
227
228
  if (typeof sec.isCollapsible === 'boolean') return sec.isCollapsible;
228
229
  if (typeof sec.collapsible === 'boolean') return sec.collapsible;
229
230
  return sectionsCollapsible;
@@ -258,7 +259,7 @@ export default function Sidebar({
258
259
 
259
260
  const sections = React.useMemo(() => {
260
261
  if (Array.isArray(navSections) && navSections.length > 0) return navSections;
261
- if (Array.isArray(navItems) && navItems.length > 0) return [{ items: navItems }];
262
+ if (Array.isArray(navItems) && navItems.length > 0) return [{ items: navItems, collapsible: false, defaultExpanded: true }];
262
263
  return [];
263
264
  }, [navSections, navItems]);
264
265