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 {
2626 /** 選択範囲の位置 */ selectionRange : Range ;
2727}
2828
29- interface ReactInternalInstance {
29+ interface ReactFiber {
3030 return : {
3131 return : {
3232 stateNode : {
@@ -48,15 +48,15 @@ export function caret(): CaretInfo {
4848 }
4949
5050 const reactKey = Object . keys ( textarea )
51- . find ( ( key ) => key . startsWith ( "__reactInternalInstance " ) ) ;
51+ . find ( ( key ) => key . startsWith ( "__reactFiber " ) ) ;
5252 if ( ! reactKey ) {
5353 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"' ,
5555 ) ;
5656 }
5757
5858 // @ts -ignore DOMを無理矢理objectとして扱っている
5959 return ( textarea [
6060 reactKey
61- ] as ReactInternalInstance ) . return . return . stateNode . props ;
61+ ] as ReactFiber ) . return . return . stateNode . props ;
6262}
You can’t perform that action at this time.
0 commit comments