Making unknown locator bands/modes read as "other" on the map.

This commit is contained in:
Marat Fayzullin 2024-01-31 19:43:39 -05:00
parent 7e25d7535b
commit 38313bf11b
1 changed files with 6 additions and 2 deletions

View File

@ -50,6 +50,10 @@ LocatorManager.prototype.update = function(id, data, map) {
// Do not update unless locator present
if (!(id in this.locators)) return false;
// Make sure we have valid band and mode names
if (!data.band) data.band = 'other';
if (!data.mode) data.mode = 'other';
// Keep track of bands
if (!(data.band in this.bands)) {
this.bands[data.band] = '#000000';