@@ -30,7 +30,7 @@ function createTransitionTimeoutPropValidator(transitionType) {
30
30
31
31
// If the duration isn't a number
32
32
}
33
- else if ( typeof props [ timeoutPropName ] !== 'number' ) {
33
+ else if ( typeof props [ timeoutPropName ] != 'number' ) {
34
34
return new Error ( timeoutPropName + ' must be a number (in milliseconds)' ) ;
35
35
}
36
36
}
@@ -219,7 +219,7 @@ export default class ReactCSSTransitionReplace extends React.Component {
219
219
_wrapChild ( child , moreProps ) {
220
220
let transitionName = this . props . transitionName ;
221
221
222
- if ( typeof transitionName === 'object' && transitionName !== null ) {
222
+ if ( typeof transitionName == 'object' && transitionName !== null ) {
223
223
transitionName = { ...transitionName } ;
224
224
delete transitionName . height ;
225
225
}
@@ -253,16 +253,16 @@ export default class ReactCSSTransitionReplace extends React.Component {
253
253
React . createElement (
254
254
'span' ,
255
255
{ key : currentChildKey } ,
256
- this . _wrapChild ( React . cloneElement ( currentChild , { isLeaving } ) , {
257
- ref : 'curr'
258
- } )
256
+ this . _wrapChild (
257
+ typeof currentChild . type == 'string' ? currentChild : React . cloneElement ( currentChild , { isLeaving } ) ,
258
+ { ref : 'curr' } )
259
259
)
260
260
) ;
261
261
}
262
262
263
263
264
264
if ( height !== null ) {
265
- const heightClassName = ( typeof transitionName === 'object' && transitionName !== null ) ?
265
+ const heightClassName = ( typeof transitionName == 'object' && transitionName !== null ) ?
266
266
transitionName . height || '' :
267
267
`${ transitionName } -height` ;
268
268
0 commit comments