mirror of
https://github.com/kikobar/mastodon.git
synced 2024-11-18 13:17:35 +00:00
Fix Chrome issue with sizes="0px" (#7886)
"Do not dumb here. Not dumb area here."
This commit is contained in:
parent
50a2854f92
commit
45b5e60909
|
@ -122,7 +122,7 @@ class Item extends React.PureComponent {
|
||||||
const hasSize = typeof originalWidth === 'number' && typeof previewWidth === 'number';
|
const hasSize = typeof originalWidth === 'number' && typeof previewWidth === 'number';
|
||||||
|
|
||||||
const srcSet = hasSize ? `${originalUrl} ${originalWidth}w, ${previewUrl} ${previewWidth}w` : null;
|
const srcSet = hasSize ? `${originalUrl} ${originalWidth}w, ${previewUrl} ${previewWidth}w` : null;
|
||||||
const sizes = hasSize ? `${displayWidth * (width / 100)}px` : null;
|
const sizes = hasSize && (displayWidth > 0) ? `${displayWidth * (width / 100)}px` : null;
|
||||||
|
|
||||||
const focusX = attachment.getIn(['meta', 'focus', 'x']) || 0;
|
const focusX = attachment.getIn(['meta', 'focus', 'x']) || 0;
|
||||||
const focusY = attachment.getIn(['meta', 'focus', 'y']) || 0;
|
const focusY = attachment.getIn(['meta', 'focus', 'y']) || 0;
|
||||||
|
|
Loading…
Reference in a new issue