diff --git a/frontend/src/components/PictureView/index.tsx b/frontend/src/components/PictureView/index.tsx index a8ee3b5..e71f019 100644 --- a/frontend/src/components/PictureView/index.tsx +++ b/frontend/src/components/PictureView/index.tsx @@ -133,7 +133,7 @@ function PictureView({ album, picture, fromAlbumView, history }: PictureViewProp preloadPreviousAndNext(picture); document.addEventListener('keydown', onKeyDown); - if ((history.location.state as any).slideshow) { + if ((history.location.state as any)?.slideshow) { startSlideshow(); }