diff --git a/packages/react/src/components/UIShell/SideNav.js b/packages/react/src/components/UIShell/SideNav.js index 7f2f4bacb0b0..8c8ade147b3b 100644 --- a/packages/react/src/components/UIShell/SideNav.js +++ b/packages/react/src/components/UIShell/SideNav.js @@ -90,7 +90,9 @@ const SideNav = React.forwardRef(function SideNav(props, ref) { : expanded; // avoid spreading `isSideNavExpanded` to non-Carbon UI Shell children return React.cloneElement(child, { - ...(CARBON_SIDENAV_ITEMS.includes(child.type?.displayName) + ...(CARBON_SIDENAV_ITEMS.includes( + child.type?.displayName ?? child.type?.name + ) ? { isSideNavExpanded: currentExpansionState, }