Преглед на файлове

Fix Chrome issue with sizes="0px" (#7886)

"Do not dumb here. Not dumb area here."
master
Eugen Rochko преди 5 години
committed by GitHub
родител
ревизия
45b5e60909
No known key found for this signature in database GPG ключ ID: 4AEE18F83AFDEB23
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. +1
    -1
      app/javascript/mastodon/components/media_gallery.js

+ 1
- 1
app/javascript/mastodon/components/media_gallery.js Целия файл

@@ -122,7 +122,7 @@ class Item extends React.PureComponent {
const hasSize = typeof originalWidth === 'number' && typeof previewWidth === 'number';

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 focusY = attachment.getIn(['meta', 'focus', 'y']) || 0;


Зареждане…
Отказ
Запис