mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Merge 6b59494e06
into 549ab089ee
This commit is contained in:
commit
1764dec34a
1 changed files with 3 additions and 1 deletions
|
@ -287,7 +287,9 @@ class MediaGallery extends PureComponent {
|
|||
|
||||
isFullSizeEligible() {
|
||||
const { media } = this.props;
|
||||
return media.size === 1 && media.getIn([0, 'meta', 'small', 'aspect']);
|
||||
const aspect = media.getIn([0, 'meta', 'small', 'aspect']);
|
||||
const minAspectRatioThreshold = 3/2;
|
||||
return media.size === 1 && typeof aspect === 'number' && aspect >= minAspectRatioThreshold;
|
||||
}
|
||||
|
||||
render () {
|
||||
|
|
Loading…
Reference in a new issue