diff --git a/src/utils/react.ts b/src/utils/react.ts index 765a9fb..82c2141 100644 --- a/src/utils/react.ts +++ b/src/utils/react.ts @@ -69,6 +69,7 @@ export function getReactRoot(o: HTMLElement | Element | Node) { return ( // @ts-expect-error 7053 o[Object.keys(o).find((k) => k.startsWith('__reactContainer$')) as string] || + // @ts-expect-error 7053 o['_reactRootContainer']?._internalRoot?.current ); } @@ -77,6 +78,7 @@ export function getReactInstance(o: HTMLElement | Element | Node) { return ( // @ts-expect-error 7053 o[Object.keys(o).find((k) => k.startsWith('__reactFiber')) as string] || + // @ts-expect-error 7053 o[Object.keys(o).find((k) => k.startsWith('__reactInternalInstance')) as string] ); }