Fix WebUI crash in edge case when media display size causes scroll

Fixes #1406
lolsob-rspec
Thibaut Girka 2020-08-17 13:53:52 +02:00 committed by ThibG
parent 323075e4c1
commit 2775132b00
1 changed files with 2 additions and 4 deletions

View File

@ -287,10 +287,8 @@ class MediaGallery extends React.PureComponent {
}
componentDidUpdate (prevProps) {
if (this.node && this.node.offsetWidth && this.node.offsetWidth != this.state.width) {
this.setState({
width: this.node.offsetWidth,
});
if (this.node) {
this.handleResize();
}
}