File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export interface CaretInfo {
26
26
/** 選択範囲の位置 */ selectionRange : Range ;
27
27
}
28
28
29
- interface ReactInternalInstance {
29
+ interface ReactFiber {
30
30
return : {
31
31
return : {
32
32
stateNode : {
@@ -48,15 +48,15 @@ export function caret(): CaretInfo {
48
48
}
49
49
50
50
const reactKey = Object . keys ( textarea )
51
- . find ( ( key ) => key . startsWith ( "__reactInternalInstance " ) ) ;
51
+ . find ( ( key ) => key . startsWith ( "__reactFiber " ) ) ;
52
52
if ( ! reactKey ) {
53
53
throw Error (
54
- " div.cursor must has the property whose name starts with `__reactInternalInstance`" ,
54
+ ' div.cursor must has the property whose name starts with "__reactFiber"' ,
55
55
) ;
56
56
}
57
57
58
58
// @ts -ignore DOMを無理矢理objectとして扱っている
59
59
return ( textarea [
60
60
reactKey
61
- ] as ReactInternalInstance ) . return . return . stateNode . props ;
61
+ ] as ReactFiber ) . return . return . stateNode . props ;
62
62
}
You can’t perform that action at this time.
0 commit comments