Skip to content
Snippets Groups Projects
Unverified Commit 5a98cf58 authored by tribut's avatar tribut :man_dancing:
Browse files

Avoid JS error when not on current day

parent 8086576f
No related branches found
No related tags found
No related merge requests found
......@@ -80,6 +80,10 @@ current_time = Time.zone.now.in_time_zone(@conference.time_zone)
const pixelsPerHour = <%= pixels_per_hour %>;
const currentTimeDiv = document.querySelector('#<%= date.strftime('day-%Y-%m-%d') %> .current-time');
if (!currentTimeDiv) {
return;
}
if (
currentTime.toDateString() === timelineStartsAt.toDateString() &&
currentTime >= timelineStartsAt &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment