Do not fail if track is not scheduled today

The new track badge logic (which builds in a link to the
videoconference room if one is specified) is failing in case
the track is not scheduled in any location today.

Fix it so that we do not display any link in this precise case.

Change-Id: Ib6d93336e7c5d7c3494d442f95295442a8169a4d
This commit is contained in:
Thierry Carrez 2020-05-29 13:54:43 +02:00
parent 220832e547
commit be84818a14
1 changed files with 5 additions and 1 deletions

View File

@ -75,7 +75,11 @@ Handlebars.registerHelper('trackbadge',
if (urls[track] != undefined) {
roomurl = urls[track];
} else {
roomurl = schedule[locations[track]]['url'];
if (locations[track] != undefined) {
roomurl = schedule[locations[track]]['url'];
} else {
roomurl = undefined;
}
}
return new Handlebars.SafeString(track_badge(track, roomurl));
});