Skip to content

Commit e12520c

Browse files
committed
fix: prevent empty array content from rendering append/prepend
1 parent 43d3fc6 commit e12520c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/eui/src/components/form/form_control_layout/form_control_layout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ const EuiFormControlLayoutSideNodes: FunctionComponent<{
259259
const AppendOrPrepend = side === 'append' ? EuiFormAppend : EuiFormPrepend;
260260

261261
if (Array.isArray(nodes)) {
262+
if (nodes.length === 0) return null;
263+
262264
content = React.Children.map(nodes, (node) =>
263265
typeof node === 'string' ? (
264266
<EuiFormLabel htmlFor={inputId}>{node}</EuiFormLabel>

0 commit comments

Comments
 (0)