Skip to content

Commit

Permalink
fix(Popper): check for undefined before accessing (#10086)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamviktora authored Feb 28, 2024
1 parent c07b540 commit c5869ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-core/src/helpers/Popper/Popper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ export const Popper: React.FunctionComponent<PopperProps> = ({
React.useEffect(() => {
// currentPopperContent = {tooltip children} || {dropdown children}
const currentPopperContent =
popper?.props?.children[1]?.props?.children || popper?.props?.children?.props?.children;
popper?.props?.children?.[1]?.props?.children || popper?.props?.children?.props?.children;
setPopperContent(currentPopperContent);

if (currentPopperContent && popperContent && currentPopperContent !== popperContent) {
Expand Down

0 comments on commit c5869ec

Please # to comment.