Add some null guards
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
2fd221bc18
commit
8d5fd9306f
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue