Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Support SSR
  • Loading branch information
perrin4869 committed May 5, 2020
commit 1736aa9b373642bff3d0c30fc4fa6ea73dd90e72
2 changes: 1 addition & 1 deletion src/Transition.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ Transition.propTypes = {
* (see
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
*/
nodeRef: PropTypes.shape({ current: PropTypes.instanceOf(Element) }),
nodeRef: PropTypes.shape({ current: PropTypes.instanceOf(typeof Element === 'undefined' ? function() {} : Element) }),

/**
* A `function` child can be used instead of a React element. This function is
Expand Down
10 changes: 10 additions & 0 deletions test/SSR-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* @jest-environment node
*/

// test that import does not crash
import * as ReactTransitionGroup from '../src'; // eslint-disable-line no-unused-vars

describe('SSR', () => {
it('should import react-transition-group in node env', () => {});
});