From 8d5fd9306f42ed2e10549c291e24d1b17af92c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 23 Jul 2021 10:07:09 +0200 Subject: [PATCH] Add some null guards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/elements/ImageView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/elements/ImageView.tsx b/src/components/views/elements/ImageView.tsx index d09062f3ab..bc559603e0 100644 --- a/src/components/views/elements/ImageView.tsx +++ b/src/components/views/elements/ImageView.tsx @@ -97,13 +97,13 @@ export default class ImageView extends React.Component { 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, };