forked from treehouse/mastodon
parent
e5dbdebc31
commit
d4b65193c7
|
@ -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 New Issue