diff --git a/packages/react-core/src/components/Toolbar/ToolbarFilter.tsx b/packages/react-core/src/components/Toolbar/ToolbarFilter.tsx index c3d3aacc14e..e15896e93f1 100644 --- a/packages/react-core/src/components/Toolbar/ToolbarFilter.tsx +++ b/packages/react-core/src/components/Toolbar/ToolbarFilter.tsx @@ -134,7 +134,8 @@ class ToolbarFilter extends React.Component {showToolbarItem && {children}} - {ReactDOM.createPortal(chipGroup, chipGroupContentRef.current.firstElementChild)} + {chipGroupContentRef?.current?.firstElementChild && + ReactDOM.createPortal(chipGroup, chipGroupContentRef.current.firstElementChild)} ); } diff --git a/yarn.lock b/yarn.lock index 61b1b428312..94334c43a8b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9070,28 +9070,6 @@ __metadata: languageName: node linkType: hard -"es-iterator-helpers@npm:^1.0.19": - version: 1.0.19 - resolution: "es-iterator-helpers@npm:1.0.19" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.3" - es-errors: "npm:^1.3.0" - es-set-tostringtag: "npm:^2.0.3" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.4" - globalthis: "npm:^1.0.3" - has-property-descriptors: "npm:^1.0.2" - has-proto: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.7" - iterator.prototype: "npm:^1.1.2" - safe-array-concat: "npm:^1.1.2" - checksum: 10c0/ae8f0241e383b3d197383b9842c48def7fce0255fb6ed049311b686ce295595d9e389b466f6a1b7d4e7bb92d82f5e716d6fae55e20c1040249bf976743b038c5 - languageName: node - linkType: hard - "es-iterator-helpers@npm:^1.1.0": version: 1.2.0 resolution: "es-iterator-helpers@npm:1.2.0" @@ -12993,19 +12971,6 @@ __metadata: languageName: node linkType: hard -"iterator.prototype@npm:^1.1.2": - version: 1.1.2 - resolution: "iterator.prototype@npm:1.1.2" - dependencies: - define-properties: "npm:^1.2.1" - get-intrinsic: "npm:^1.2.1" - has-symbols: "npm:^1.0.3" - reflect.getprototypeof: "npm:^1.0.4" - set-function-name: "npm:^2.0.1" - checksum: 10c0/a32151326095e916f306990d909f6bbf23e3221999a18ba686419535dcd1749b10ded505e89334b77dc4c7a58a8508978f0eb16c2c8573e6d412eb7eb894ea79 - languageName: node - linkType: hard - "iterator.prototype@npm:^1.1.3": version: 1.1.3 resolution: "iterator.prototype@npm:1.1.3"