File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 47
47
"@types/jest" : " ^29.4.0" ,
48
48
"@types/react" : " ^18.0.0" ,
49
49
"@types/react-dom" : " ^18.0.0" ,
50
+ "@types/react-is" : " ^18.3.0" ,
50
51
"@types/responselike" : " ^1.0.0" ,
51
52
"@types/warning" : " ^3.0.0" ,
52
53
"@umijs/fabric" : " ^3.0.0" ,
Original file line number Diff line number Diff line change 1
1
/* eslint-disable no-param-reassign */
2
2
import type * as React from 'react' ;
3
- import { isValidElement , ReactNode } from 'react' ;
3
+ import { isValidElement } from 'react' ;
4
4
import { ForwardRef , isFragment , isMemo } from 'react-is' ;
5
5
import useMemo from './hooks/useMemo' ;
6
6
@@ -59,19 +59,16 @@ export function supportRef(nodeOrComponent: any): boolean {
59
59
) {
60
60
return false ;
61
61
}
62
-
63
62
return true ;
64
63
}
65
64
66
- export function supportNodeRef ( node : ReactNode ) : boolean {
65
+ export function supportNodeRef ( node : React . ReactNode ) : boolean {
67
66
if ( ! isValidElement ( node ) ) {
68
67
return false ;
69
68
}
70
-
71
69
if ( isFragment ( node ) ) {
72
70
return false ;
73
71
}
74
-
75
72
return supportRef ( node ) ;
76
73
}
77
74
/* eslint-enable */
You can’t perform that action at this time.
0 commit comments