mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-30 23:33:42 +01:00
Fix WebUI crash in edge case when media display size causes scroll
Fixes #1406
This commit is contained in:
parent
e5dbdebc31
commit
d4b65193c7
1 changed files with 2 additions and 4 deletions
|
@ -287,10 +287,8 @@ class MediaGallery extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate (prevProps) {
|
componentDidUpdate (prevProps) {
|
||||||
if (this.node && this.node.offsetWidth && this.node.offsetWidth != this.state.width) {
|
if (this.node) {
|
||||||
this.setState({
|
this.handleResize();
|
||||||
width: this.node.offsetWidth,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue