Fix JS error from some link previews (#5556)
Этот коммит содержится в:
коммит произвёл
enahum
родитель
66c5f7a31c
Коммит
0cd34227cc
@@ -81,6 +81,10 @@ export default class PostAttachmentOpenGraph extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getBestImageUrl() {
|
getBestImageUrl() {
|
||||||
|
if (this.state.data.images == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
const nearestPointData = CommonUtils.getNearestPoint(this.imageDimentions, this.state.data.images, 'width', 'height');
|
const nearestPointData = CommonUtils.getNearestPoint(this.imageDimentions, this.state.data.images, 'width', 'height');
|
||||||
|
|
||||||
const bestImage = nearestPointData.nearestPoint;
|
const bestImage = nearestPointData.nearestPoint;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user