From eda52774d0219713074f493368c7397854f00818 Mon Sep 17 00:00:00 2001 From: Naoki Kosaka Date: Sat, 16 Sep 2017 22:00:01 +0900 Subject: [PATCH] Fix hasSize condition in secSet and sizes. (#4969) --- app/javascript/mastodon/components/media_gallery.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/components/media_gallery.js b/app/javascript/mastodon/components/media_gallery.js index 068220f8f5..78a2f5dc47 100644 --- a/app/javascript/mastodon/components/media_gallery.js +++ b/app/javascript/mastodon/components/media_gallery.js @@ -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 = (