Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
fix: Dodge SSR issue (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored and FezVrasta committed Apr 1, 2018
1 parent 79544d7 commit 484ed14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Popper.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class Popper extends Component {
modifiers: PropTypes.object,
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
target: PropTypes.oneOfType([
PropTypes.instanceOf(Element),
// the following check is needed for SSR
PropTypes.instanceOf(typeof Element !== 'undefined' ? Element : Object),
PropTypes.shape({
getBoundingClientRect: PropTypes.func.isRequired,
clientWidth: PropTypes.number.isRequired,
Expand Down

0 comments on commit 484ed14

Please sign in to comment.