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

th-downstream
Naoki Kosaka 7 years ago committed by Eugen Rochko
parent d4a1ddd46a
commit eda52774d0

@ -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

Loading…
Cancel
Save