Fix issue in case unknown location is provided

Using the "location" command to point to an unknown location
would cause the Javascript displaying the schedule to crash.

It's a bit useless to use that command in a virtual PTG with
meeting URLs, however the page should handle that case and fail
more gracefully.

Change-Id: I271e2ead0094d407274cbb22e499d7b2c49631b4
This commit is contained in:
Thierry Carrez 2020-10-27 16:15:33 +01:00
parent 8f00364211
commit 7ae6c6cc55
2 changed files with 8 additions and 2 deletions

View File

@ -186,7 +186,9 @@ location
The room your track discussions happen in should be filled automatically
by the PTGbot by looking up the schedule information. In case it's not right,
you can overwrite it using the ``location`` command. Example usage::
you can overwrite it using the ``location`` command. This command is
useless in a virtual PTG, where you should use the "url" command to update
the virtual meeting location. Example usage::
#oslo location Level B, Ballroom A

View File

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