File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -390,7 +390,11 @@ Transition.propTypes = {
390
390
* (see
391
391
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
392
392
*/
393
- nodeRef : PropTypes . shape ( { current : PropTypes . instanceOf ( Element ) } ) ,
393
+ nodeRef : PropTypes . shape ( {
394
+ current : typeof Element === 'undefined'
395
+ ? PropTypes . any
396
+ : PropTypes . instanceOf ( Element )
397
+ } ) ,
394
398
395
399
/**
396
400
* A `function` child can be used instead of a React element. This function is
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @jest -environment node
3
+ */
4
+
5
+ // test that import does not crash
6
+ import * as ReactTransitionGroup from '../src' ; // eslint-disable-line no-unused-vars
7
+
8
+ describe ( 'SSR' , ( ) => {
9
+ it ( 'should import react-transition-group in node env' , ( ) => { } ) ;
10
+ } ) ;
You can’t perform that action at this time.
0 commit comments