You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Add some null guards
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -97,13 +97,13 @@ export default class ImageView extends React.Component<IProps, IState> {
|
|||||||
thumbnailInfo?.positionX +
|
thumbnailInfo?.positionX +
|
||||||
(thumbnailInfo?.width / 2) -
|
(thumbnailInfo?.width / 2) -
|
||||||
(UIStore.instance.windowWidth / 2)
|
(UIStore.instance.windowWidth / 2)
|
||||||
),
|
) ?? 0,
|
||||||
translationY: (
|
translationY: (
|
||||||
thumbnailInfo?.positionY +
|
thumbnailInfo?.positionY +
|
||||||
(thumbnailInfo?.height / 2) -
|
(thumbnailInfo?.height / 2) -
|
||||||
(UIStore.instance.windowHeight / 2) -
|
(UIStore.instance.windowHeight / 2) -
|
||||||
(PANEL_HEIGHT / 2)
|
(PANEL_HEIGHT / 2)
|
||||||
),
|
) ?? 0,
|
||||||
moving: false,
|
moving: false,
|
||||||
contextMenuDisplayed: false,
|
contextMenuDisplayed: false,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user