Merge pull request #11 from torjusti/fix/update-dimensions

Update dimensions when toggling sidebar
master
Stefan Otto 2018-07-13 10:54:13 +02:00 committed by GitHub
commit e2f1bc1c70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -23,9 +23,9 @@ class Peers extends React.Component
this.updateDimensions();
}
updateDimensions(props = this.props)
updateDimensions()
{
const n = props.videoStreams ? props.videoStreams : 0;
const n = this.props.videoStreams ? this.props.videoStreams : 0;
if (n == 0)
{
@ -72,9 +72,9 @@ class Peers extends React.Component
window.removeEventListener('resize', this.resizeUpdate.bind(this));
}
componentWillReceiveProps(nextProps)
componentDidUpdate()
{
this.updateDimensions(nextProps);
this.updateDimensions();
}
render()