We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53640ae commit 3b077acCopy full SHA for 3b077ac
src/hooks/useWinClick.ts
@@ -53,8 +53,8 @@ export default function useWinClick(
53
}
54
55
// Warning if target and popup not in same root
56
- if (process.env.NODE_ENV !== 'production') {
57
- const targetRoot = targetEle?.getRootNode?.();
+ if (process.env.NODE_ENV !== 'production' && targetEle) {
+ const targetRoot = targetEle.getRootNode?.();
58
const popupRoot = popupEle.getRootNode?.();
59
60
warning(
0 commit comments