From 730558bc555a6f56479a4800c0454955a49acd49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Simsi=C3=B6?= Date: Mon, 22 Jan 2024 19:30:27 +0200 Subject: [PATCH] Fix undefined access when there is no current slide --- infotv/frontend/src/TVApp.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/infotv/frontend/src/TVApp.tsx b/infotv/frontend/src/TVApp.tsx index 67ad591..4b2e16d 100644 --- a/infotv/frontend/src/TVApp.tsx +++ b/infotv/frontend/src/TVApp.tsx @@ -116,6 +116,7 @@ export default class TVApp extends React.Component { this.setState({ ticksUntilNextSlide: ticks }); const currentSlide = this.getDeck()[this.state.slideIndex]; const isVideoRunning = + currentSlide && isVideoSlide(currentSlide) && currentSlide.style === "nextSlideAtEnd" && !this.state.videoRef?.current?.ended;