Skip to content

Commit 0e5923f

Browse files
committed
[#13098] Fix "Invalid prop ref supplied to React.Fragment. React.Fragment can only have key and children props."
1 parent fbdb7c6 commit 0e5923f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

web-frontend/src/main/v3/packages/ui/src/components/Popper/Popper.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { cn } from '../../lib';
77
// eslint-disable-next-line @typescript-eslint/no-explicit-any
88
export interface PopperProps extends Omit<PPProps<any>, 'children'> {
99
content: React.ReactNode;
10-
children: React.ReactElement;
10+
children?: React.ReactElement;
1111
className?: string;
1212
positionUpdatable?: boolean;
1313
hideArrow?: boolean;
@@ -66,6 +66,7 @@ export const Popper = ({
6666
<Manager>
6767
<Reference>
6868
{({ ref }) =>
69+
children &&
6970
React.cloneElement(children, {
7071
ref: mergeRefs([ref, referenceRef]),
7172
onClick: handleClickTarget,

web-frontend/src/main/v3/packages/ui/src/components/ServerMap/ServerMapMenu.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ export const ServerMapMenu = ({ children, position, contentType }: ServerMapMenu
3939
},
4040
]}
4141
hideArrow
42-
>
43-
<></>
44-
</Popper>
42+
/>
4543
)}
4644
</>
4745
);

0 commit comments

Comments
 (0)