Skip to content

Commit 41e4429

Browse files
authored
fix(Toolbar): Fixed null exception in Toolbar filter V5 (#11223)
* fix(Toolbar): Fixed null exception in Toolbar filter V5 * Updates form review comments * fix yarn
1 parent 33c7c04 commit 41e4429

File tree

2 files changed

+2
-36
lines changed

2 files changed

+2
-36
lines changed

packages/react-core/src/components/Toolbar/ToolbarFilter.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ class ToolbarFilter extends React.Component<ToolbarFilterProps, ToolbarFilterSta
134134
return (
135135
<React.Fragment>
136136
{showToolbarItem && <ToolbarItem {...props}>{children}</ToolbarItem>}
137-
{ReactDOM.createPortal(chipGroup, chipGroupContentRef.current.firstElementChild)}
137+
{chipGroupContentRef?.current?.firstElementChild &&
138+
ReactDOM.createPortal(chipGroup, chipGroupContentRef.current.firstElementChild)}
138139
</React.Fragment>
139140
);
140141
}

yarn.lock

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9070,28 +9070,6 @@ __metadata:
90709070
languageName: node
90719071
linkType: hard
90729072

9073-
"es-iterator-helpers@npm:^1.0.19":
9074-
version: 1.0.19
9075-
resolution: "es-iterator-helpers@npm:1.0.19"
9076-
dependencies:
9077-
call-bind: "npm:^1.0.7"
9078-
define-properties: "npm:^1.2.1"
9079-
es-abstract: "npm:^1.23.3"
9080-
es-errors: "npm:^1.3.0"
9081-
es-set-tostringtag: "npm:^2.0.3"
9082-
function-bind: "npm:^1.1.2"
9083-
get-intrinsic: "npm:^1.2.4"
9084-
globalthis: "npm:^1.0.3"
9085-
has-property-descriptors: "npm:^1.0.2"
9086-
has-proto: "npm:^1.0.3"
9087-
has-symbols: "npm:^1.0.3"
9088-
internal-slot: "npm:^1.0.7"
9089-
iterator.prototype: "npm:^1.1.2"
9090-
safe-array-concat: "npm:^1.1.2"
9091-
checksum: 10c0/ae8f0241e383b3d197383b9842c48def7fce0255fb6ed049311b686ce295595d9e389b466f6a1b7d4e7bb92d82f5e716d6fae55e20c1040249bf976743b038c5
9092-
languageName: node
9093-
linkType: hard
9094-
90959073
"es-iterator-helpers@npm:^1.1.0":
90969074
version: 1.2.0
90979075
resolution: "es-iterator-helpers@npm:1.2.0"
@@ -12993,19 +12971,6 @@ __metadata:
1299312971
languageName: node
1299412972
linkType: hard
1299512973

12996-
"iterator.prototype@npm:^1.1.2":
12997-
version: 1.1.2
12998-
resolution: "iterator.prototype@npm:1.1.2"
12999-
dependencies:
13000-
define-properties: "npm:^1.2.1"
13001-
get-intrinsic: "npm:^1.2.1"
13002-
has-symbols: "npm:^1.0.3"
13003-
reflect.getprototypeof: "npm:^1.0.4"
13004-
set-function-name: "npm:^2.0.1"
13005-
checksum: 10c0/a32151326095e916f306990d909f6bbf23e3221999a18ba686419535dcd1749b10ded505e89334b77dc4c7a58a8508978f0eb16c2c8573e6d412eb7eb894ea79
13006-
languageName: node
13007-
linkType: hard
13008-
1300912974
"iterator.prototype@npm:^1.1.3":
1301012975
version: 1.1.3
1301112976
resolution: "iterator.prototype@npm:1.1.3"

0 commit comments

Comments
 (0)