File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -104,19 +104,15 @@ export function wrapReactClass(node: any, prop: any = 'type') {
104
104
105
105
export function getReactRoot ( o : HTMLElement | Element | Node ) {
106
106
return (
107
- // @ts -expect-error 7053
108
- o [ Object . keys ( o ) . find ( ( k ) => k . startsWith ( '__reactContainer$' ) ) as string ] ||
109
- // @ts -expect-error 7053
110
- o [ '_reactRootContainer' ] ?. _internalRoot ?. current
107
+ ( o as any ) [ Object . keys ( o ) . find ( ( k ) => k . startsWith ( '__reactContainer$' ) ) as string ] ||
108
+ ( o as any ) [ '_reactRootContainer' ] ?. _internalRoot ?. current
111
109
) ;
112
110
}
113
111
114
112
export function getReactInstance ( o : HTMLElement | Element | Node ) {
115
113
return (
116
- // @ts -expect-error 7053
117
- o [ Object . keys ( o ) . find ( ( k ) => k . startsWith ( '__reactFiber' ) ) as string ] ||
118
- // @ts -expect-error 7053
119
- o [ Object . keys ( o ) . find ( ( k ) => k . startsWith ( '__reactInternalInstance' ) ) as string ]
114
+ ( o as any ) [ Object . keys ( o ) . find ( ( k ) => k . startsWith ( '__reactFiber' ) ) as string ] ||
115
+ ( o as any ) [ Object . keys ( o ) . find ( ( k ) => k . startsWith ( '__reactInternalInstance' ) ) as string ]
120
116
) ;
121
117
}
122
118
You can’t perform that action at this time.
0 commit comments