Skip to content

Commit dbe400e

Browse files
committed
fix: ensure getTextContent returns an empty string for invalid nodes in Popup component
1 parent 3f2bea8 commit dbe400e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Popup.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ const getTextContent = (node: (() => React.ReactNode) | React.ReactNode): string
2929
if (React.isValidElement(resolvedNode)) {
3030
return getTextContent(resolvedNode.props.children);
3131
}
32+
33+
return '';
3234
};
3335

3436
export default function Popup(props: ContentProps) {

0 commit comments

Comments
 (0)