mirror of
https://github.com/vector-im/element-web.git
synced 2025-10-17 10:21:44 +02:00
Add some null guards
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
2fd221bc18
commit
8d5fd9306f
@ -97,13 +97,13 @@ export default class ImageView extends React.Component<IProps, IState> {
|
||||
thumbnailInfo?.positionX +
|
||||
(thumbnailInfo?.width / 2) -
|
||||
(UIStore.instance.windowWidth / 2)
|
||||
),
|
||||
) ?? 0,
|
||||
translationY: (
|
||||
thumbnailInfo?.positionY +
|
||||
(thumbnailInfo?.height / 2) -
|
||||
(UIStore.instance.windowHeight / 2) -
|
||||
(PANEL_HEIGHT / 2)
|
||||
),
|
||||
) ?? 0,
|
||||
moving: false,
|
||||
contextMenuDisplayed: false,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user