Skip to content

Commit

Permalink
fix(PictureView): attribute access on undefined location.state
Browse files Browse the repository at this point in the history
  • Loading branch information
japsu committed Sep 28, 2024
1 parent 912449c commit e7025a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/PictureView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit e7025a9

Please sign in to comment.