Skip to content

SSR in 4.4.0 crashes #618

Closed
Closed
@perrin4869

Description

@perrin4869

What is the current behavior?

Running this module on node.js (for example during ssr) results in: ReferenceError: Element is not defined

What is the expected behavior?

Importing react-transition-group does not result in an error

The problem is this line:

nodeRef: PropTypes.shape({ current: PropTypes.instanceOf(Element) }),

A possible solution is: Element = typeof Element === 'undefined' ? function(){} : Element

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions