File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -197,12 +197,12 @@ export function genCSSMotion(config: CSSMotionConfig) {
197197 }
198198
199199 // We should render children when motionStyle is sync with stepStatus
200- const returnNode = React . useMemo ( ( ) => {
200+ const returnNode = React . useMemo < React . ReactElement | null > ( ( ) => {
201201 if ( styleReady === 'NONE' ) {
202202 return null ;
203203 }
204204
205- let motionChildren : React . ReactNode ;
205+ let motionChildren : React . ReactElement | null ;
206206 const mergedProps = { ...eventProps , visible } ;
207207
208208 if ( ! children ) {
@@ -255,7 +255,7 @@ export function genCSSMotion(config: CSSMotionConfig) {
255255 }
256256
257257 return motionChildren ;
258- } , [ idRef . current ] ) as React . ReactElement ;
258+ } , [ idRef . current ] ) ;
259259
260260 if ( isRefNotConsumed ( children ) && supportNodeRef ( returnNode ) ) {
261261 const originNodeRef = getNodeRef ( returnNode ) ;
You can’t perform that action at this time.
0 commit comments