Skip to content

Commit

Permalink
Handle cases where panel item's inner element returns null
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Jul 29, 2021
1 parent 7c22312 commit dbaa31c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const PanelContext = createContext( {} );

export const usePanelContext = () => useContext( PanelContext );

const isMenuItem = ( item ) => item.type === ProgressiveDisclosurePanelItem;
const isMenuItem = ( item ) => item?.type === ProgressiveDisclosurePanelItem;

const ProgressiveDisclosurePanel = ( props ) => {
const { children, className, label: menuLabel, resetAll, title } = props;
Expand Down

0 comments on commit dbaa31c

Please sign in to comment.