1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Fix hasSize condition in secSet and sizes. (#4969)

This commit is contained in:
Naoki Kosaka 2017-09-16 22:00:01 +09:00 committed by Eugen Rochko
parent 48d77ea1eb
commit cea5597722

View file

@ -119,8 +119,8 @@ 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`; const srcSet = hasSize ? `${originalUrl} ${originalWidth}w, ${previewUrl} ${previewWidth}w` : null;
const sizes = hasSize && `(min-width: 1025px) ${320 * (width / 100)}px, ${width}vw`; const sizes = hasSize ? `(min-width: 1025px) ${320 * (width / 100)}px, ${width}vw` : null;
thumbnail = ( thumbnail = (
<a <a