Skip to content

Commit

Permalink
fix(utils/react): shut it ts
Browse files Browse the repository at this point in the history
  • Loading branch information
AAGaming00 committed May 24, 2024
1 parent 735080f commit d91f49e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
Expand All @@ -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]
);
}
Expand Down

0 comments on commit d91f49e

Please sign in to comment.