diff --git a/packages/react-core/src/components/Toolbar/ToolbarFilter.tsx b/packages/react-core/src/components/Toolbar/ToolbarFilter.tsx index c3d3aacc14e..c4fdceb45f9 100644 --- a/packages/react-core/src/components/Toolbar/ToolbarFilter.tsx +++ b/packages/react-core/src/components/Toolbar/ToolbarFilter.tsx @@ -134,7 +134,10 @@ class ToolbarFilter extends React.Component {showToolbarItem && {children}} - {ReactDOM.createPortal(chipGroup, chipGroupContentRef.current.firstElementChild)} + {chipGroupContentRef && + chipGroupContentRef?.current !== null && + chipGroupContentRef.current?.firstElementChild !== null && + ReactDOM.createPortal(chipGroup, chipGroupContentRef.current.firstElementChild)} ); }