diff --git a/src/Wrapper.js b/src/Wrapper.js index 4d36c0a..a666fe4 100644 --- a/src/Wrapper.js +++ b/src/Wrapper.js @@ -13,6 +13,11 @@ class Wrapper extends React.Component { }; componentDidMount() { + if (!this.props.height || + !this.props.width) { + this.getDimensions(); + } + if (this.props.responsive) { window.addEventListener('resize', this.getDimensions, false); }