Browse Source

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

pull/4/head
Naoki Kosaka 6 years ago
committed by Eugen Rochko
parent
commit
cea5597722
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/javascript/mastodon/components/media_gallery.js

+ 2
- 2
app/javascript/mastodon/components/media_gallery.js View File

@ -119,8 +119,8 @@ class Item extends React.PureComponent {
const hasSize = typeof originalWidth === 'number' && typeof previewWidth === 'number';
const srcSet = hasSize && `${originalUrl} ${originalWidth}w, ${previewUrl} ${previewWidth}w`;
const sizes = hasSize && `(min-width: 1025px) ${320 * (width / 100)}px, ${width}vw`;
const srcSet = hasSize ? `${originalUrl} ${originalWidth}w, ${previewUrl} ${previewWidth}w` : null;
const sizes = hasSize ? `(min-width: 1025px) ${320 * (width / 100)}px, ${width}vw` : null;
thumbnail = (
<a

Loading…
Cancel
Save