From 0a5cb537f0fc5c6651b996ca44601eb2c497a222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Kr=C5=A1ka?= Date: Tue, 7 May 2024 18:15:22 +0200 Subject: [PATCH] fix event countdown --- app/Modules/Fykos/DefaultModule/templates/Default/default.latte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Modules/Fykos/DefaultModule/templates/Default/default.latte b/app/Modules/Fykos/DefaultModule/templates/Default/default.latte index ef544678..f591a169 100644 --- a/app/Modules/Fykos/DefaultModule/templates/Default/default.latte +++ b/app/Modules/Fykos/DefaultModule/templates/Default/default.latte @@ -633,7 +633,7 @@ {if $countdownEventsIndices['upcoming'][$lang] < $numOfEvents[$lang]} var countDownDatePrimary = new Date({$events[$countdownEventsIndices['upcoming'][$lang]]['date']}); {/if} - {if $countdownEventsIndices['next'][$lang] < $numOfEvents[$lang]} + {if !is_null($countdownEventsIndices['next'][$lang]) && $countdownEventsIndices['next'][$lang] < $numOfEvents[$lang]} var countDownDateSecondary = new Date({$events[$countdownEventsIndices['next'][$lang]]['date']}); {/if}