File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -390,7 +390,11 @@ Transition.propTypes = {
390390 * (see
391391 * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
392392 */
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+ } ) ,
394398
395399 /**
396400 * 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