From a4ad26ac0bd1503a25a951c3df5ee1312bd9a421 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 20 Nov 2021 09:22:16 +0100 Subject: [PATCH] fix errors if there's no track --- pretalx_lower_thirds/static/pretalx_lower_thirds/update.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pretalx_lower_thirds/static/pretalx_lower_thirds/update.js b/pretalx_lower_thirds/static/pretalx_lower_thirds/update.js index 05ecff0..ee25ec1 100644 --- a/pretalx_lower_thirds/static/pretalx_lower_thirds/update.js +++ b/pretalx_lower_thirds/static/pretalx_lower_thirds/update.js @@ -49,10 +49,14 @@ function update_lower_third() { if (current_talk) { $('#title').text(current_talk['title']); $('#speaker').text(current_talk['persons'].join(', ')); - $('#box').css('border-bottom', '10px solid ' + current_talk['track']['color']); } else { $('#title').text('Currently no talk'); $('#speaker').text(''); + } + + if (current_talk && current_talk['track']) { + $('#box').css('border-bottom', '10px solid ' + current_talk['track']['color']); + } else { $('#box').css('border-bottom', 'none'); } }