@digitaldefiance/express-suite-react-components 2.5.6 → 2.5.7

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/README.md CHANGED
@@ -362,6 +362,10 @@ MIT © Digital Defiance
362
362
 
363
363
  ## ChangeLog
364
364
 
365
+ ### Version 2.5.7
366
+
367
+ - Relax isRestricted check to default false if no roles available
368
+
365
369
  ### Version 2.5.6
366
370
 
367
371
  - Use new toggleColorMode on MenuContext
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitaldefiance/express-suite-react-components",
3
- "version": "2.5.6",
3
+ "version": "2.5.7",
4
4
  "description": "React MUI components for Digital Defiance Express Suite",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -39,7 +39,7 @@ const MenuProvider = ({ children, menuConfigs = [], enableBackupCodes = true })
39
39
  }, [registerMenuOption]);
40
40
  const menuOptions = (0, react_1.useMemo)(() => {
41
41
  const isUserRestricted = () => {
42
- return user?.roles.some((role) => role.child);
42
+ return user?.roles?.some((role) => role.child) ?? false;
43
43
  };
44
44
  let index = 0;
45
45
  const baseOptions = [