Skip to content

Commit

Permalink
Fix undefined access when there is no current slide
Browse files Browse the repository at this point in the history
  • Loading branch information
Logima committed Jan 22, 2024
1 parent 987b00c commit 730558b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions infotv/frontend/src/TVApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export default class TVApp extends React.Component<TVAppProps, TVAppState> {
this.setState({ ticksUntilNextSlide: ticks });
const currentSlide = this.getDeck()[this.state.slideIndex];
const isVideoRunning =
currentSlide &&
isVideoSlide(currentSlide) &&
currentSlide.style === "nextSlideAtEnd" &&
!this.state.videoRef?.current?.ended;
Expand Down

0 comments on commit 730558b

Please sign in to comment.