Skip to content

Commit 0a317bf

Browse files
fix(UIShell): refactor displayName check (#14097)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 9ed61f7 commit 0a317bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/react/src/components/UIShell/HeaderPanel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const HeaderPanel = React.forwardRef(function HeaderPanel(
7171
setLastClickedElement(focusedElement);
7272

7373
if (
74-
children.type.__docgenInfo.displayName === 'Switcher' &&
74+
children.type?.displayName === 'Switcher' &&
7575
!focusedElement?.closest(`.${prefix}--header-panel--expanded`) &&
7676
!focusedElement?.closest(`.${prefix}--header__action`) &&
7777
!headerPanelRef?.current?.classList.contains(`${prefix}--switcher`) &&

0 commit comments

Comments
 (0)