fix(utils/react): shut it ts

This commit is contained in:
AAGaming
2024-05-24 16:22:51 -04:00
parent 735080fee3
commit d91f49e728

View File

@@ -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]
);
}