Skip to content
Snippets Groups Projects
Commit f49e6a75 authored by David Trattnig's avatar David Trattnig
Browse files

Fix active flag.

parent 1ccdd637
No related branches found
No related tags found
No related merge requests found
......@@ -52,10 +52,11 @@
function isActive(item) {
if (item.track.duration != null && parseInt(item.track.duration) > 0) {
let startDate = new Date(item.track_start);
let endDate = new Date(startDate.getTime() + item.track.duration*1000);
let endDate = new Date(startDate.getTime());
endDate.setSeconds(endDate.getSeconds() + parseInt(item.track.duration));
let now = new Date();
if (startDate < now < endDate) {
if (startDate < now && now < endDate) {
return "active-track";
} else {
return "";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment